use of org.nextprot.api.core.domain.Publication in project nextprot-api by calipho-sib.
the class PublicationServiceIntegrationTest method testPublicationAbstract.
@Test
public void testPublicationAbstract() {
Publication publication = publicationService.findPublicationById(41589965);
Assert.assertTrue(publication.getFirstPage().equals("254"));
// check that abstract bug CALIPHOMISC-241 is fixed (pmid 24867236)
Assert.assertTrue(publication.getAbstractText().length() > 0);
}
use of org.nextprot.api.core.domain.Publication in project nextprot-api by calipho-sib.
the class PublicationServiceIntegrationTest method testPublicationAbstractAsItShouldBeIfLoadedCorrectly.
@Test
@Ignore
public void testPublicationAbstractAsItShouldBeIfLoadedCorrectly() {
Publication publication = publicationService.findPublicationById(41589965);
Assert.assertTrue(publication.getFirstPage().equals("254"));
// check that abstract bug CALIPHOMISC-241 is fixed (pmid 24867236)
System.err.println(publication.getAbstractText());
Assert.assertTrue(publication.getAbstractText().contains("regulator of microtubule organisation"));
}
use of org.nextprot.api.core.domain.Publication in project nextprot-api by calipho-sib.
the class StatementAnnotationBuilder method findPublicationId.
long findPublicationId(Statement statement) {
String referenceDB = statement.getValue(StatementField.REFERENCE_DATABASE);
String referenceAC = statement.getValue(StatementField.REFERENCE_ACCESSION);
Publication publication = publicationService.findPublicationByDatabaseAndAccession(referenceDB, referenceAC);
if (publication == null) {
String message = "can 't find publication db:" + referenceDB + " id:" + referenceAC;
LOGGER.error(message);
throw new NextProtException(message);
}
return publication.getPublicationId();
}
use of org.nextprot.api.core.domain.Publication in project nextprot-api by calipho-sib.
the class PublicationDaoIntegrationTest method testPubMedPublication.
@Test
public void testPubMedPublication() {
Publication publication = publicationDao.findPublicationByDatabaseAndAccession("PubMed", "25923089");
Assert.assertEquals("Correlation of hepcidin level with insulin resistance and endocrine glands function in major thalassemia.", publication.getTitle());
}
use of org.nextprot.api.core.domain.Publication in project nextprot-api by calipho-sib.
the class PublicationDaoIntegrationTest method testOnlinePublication.
@Test
public void testOnlinePublication() {
Publication publication = publicationDao.findPublicationById(3183821L);
Assert.assertEquals(PublicationType.ONLINE_PUBLICATION, publication.getPublicationType());
Assert.assertTrue(!publication.isLocalizableInBookMedium());
Assert.assertEquals("SHMPD", publication.getPublicationResourceLocator().getName());
Assert.assertEquals("http://shmpd.bii.a-star.edu.sg/gene.php?genestart=A&genename=BRCA1", ((WebPublicationPage) publication.getPublicationResourceLocator()).getUrl());
Assert.assertEquals("The Singapore human mutation and polymorphism database", publication.getTitle());
}
Aggregations