use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.
the class DOIResolverImplIT method resolveDOIByNonExistentCitation.
@Test
public void resolveDOIByNonExistentCitation() throws IOException {
DOI doi = new DOIResolverImpl().resolveDoiFor("A. Thessen. 2014. Species associations extracted from EOL text data objects via text mining. Accessed at <associations_all_revised.txt> on 05 Feb 2018 and add some more and other things");
assertThat(doi, is(nullValue()));
}
use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.
the class DOIResolverImplIT method resolveDOIByReferenceMatch2.
@Test
public void resolveDOIByReferenceMatch2() throws IOException {
DOI doi = new DOIResolverImpl().resolveDoiFor(MEDAN);
assertThat(doi.toString(), is(MEDAN_DOI));
}
use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.
the class DOIResolverImplIT method findCitationForShortDOI.
@Test
public void findCitationForShortDOI() throws IOException, URISyntaxException {
String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("1007", "s13127-011-0039-1"));
assertThat(citationForDOI, is(notNullValue()));
}
use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.
the class DOIResolverImplIT method resolveWithCrossRefIntermittentRuntimeError.
@Test
public void resolveWithCrossRefIntermittentRuntimeError() throws IOException {
// see https://github.com/CrossRef/rest-api-doc/issues/93
String citation = new DOIResolverImpl().findCitationForDOI(new DOI("1017", "s0266467499000760"));
assertThat(citation, is("Poulin B, Wright SJ, Lefebvre G, Calderón O. Interspecific synchrony and asynchrony in the fruiting phenologies of congeneric bird-dispersed plants in Panama. Journal of Tropical Ecology [Internet]. 1999 March;15(2):213–227. Available from: http://dx.doi.org/10.1017/s0266467499000760"));
}
use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.
the class DOIResolverImplIT method findCitationForDOI.
@Test
public void findCitationForDOI() throws IOException {
String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("1086", "283073"));
assertThat(citationForDOI, is("Menge BA, Sutherland JP. Species Diversity Gradients: Synthesis of the Roles of Predation, Competition, and Temporal Heterogeneity. The American Naturalist [Internet]. 1976 May;110(973):351–369. Available from: http://dx.doi.org/10.1086/283073"));
}
Aggregations