use of ubic.gemma.model.common.description.PublicationType in project Gemma by PavlidisLab.
the class PubMedXMLParserTest method testParseRetracted.
/*
* PMID 7914452 is an example of a retracted article.
*/
@Test
public void testParseRetracted() {
try {
testStream = PubMedXMLParserTest.class.getResourceAsStream("/data/pubmed-retracted.xml");
Collection<BibliographicReference> brl = testParser.parse(testStream);
BibliographicReference br = brl.iterator().next();
assertNotNull(br.getAbstractText());
assertEquals("Retracted [In: Garey CE, Schwarzman AL, Rise ML, Seyfried TN. Nat Genet. 1995 Sep;11(1):104 PMID=7550304]", br.getDescription());
boolean ok = false;
for (PublicationType pt : br.getPublicationTypes()) {
if ("Retracted Publication".equals(pt.getType())) {
ok = true;
}
}
assertTrue(ok);
} catch (RuntimeException e) {
this.logOrThrowException(e);
}
}
Aggregations