Search in sources :

Example 26 with DOI

use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.

the class DOIResolverImplIT method findCitationForDOIWithUnescapeChars.

@Test
public void findCitationForDOIWithUnescapeChars() throws IOException, URISyntaxException {
    String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("1642", "0004-8038(2005)122[1182:baemfa]2.0.co;2"));
    assertThat(citationForDOI, is(notNullValue()));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 27 with DOI

use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.

the class DOIResolverImplIT method findCitationForDOI3.

@Test
public void findCitationForDOI3() throws IOException {
    String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("2307", "177149"));
    assertThat(citationForDOI, is("Yodzis P. DIFFUSE EFFECTS IN FOOD WEBS. Ecology [Internet]. 2000 January;81(1):261–266. Available from: http://dx.doi.org/10.1890/0012-9658(2000)081[0261:DEIFW]2.0.CO;2"));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 28 with DOI

use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.

the class DOIResolverImplIT method possiblyMalformedDOI.

@Test
public void possiblyMalformedDOI() throws IOException {
    DOI doi = new DOIResolverImpl().resolveDoiFor("Tutin, C.E.G., Ham, R.M., White, L.J.T., Harrison, M.J.S. 1997. The primate community of the Lopé Reserve, Gabon: diets, responses to fruit scarcity, and effects on biomass. American Journal of Primatology, 42: 1-24.");
    assertNotNull(doi);
    assertThat(doi.toString(), is("10.1002/(sici)1098-2345(1997)42:1<1::aid-ajp1>3.0.co;2-0"));
}
Also used : DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 29 with DOI

use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.

the class DOIResolverImplIT method resolveDOIByNonExistentCitation3.

@Test
public void resolveDOIByNonExistentCitation3() throws IOException {
    DOI doi = new DOIResolverImpl().resolveDoiFor("Bundgaard, M. (2003). Tidslig og rumlig variation i et plante-bestøvernetværk. Msc thesis. University of Aarhus. Aarhus, Denmark.");
    assertThat(doi, is(nullValue()));
}
Also used : DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 30 with DOI

use of org.globalbioticinteractions.doi.DOI in project eol-globi-data by jhpoelen.

the class DOIResolverImplIT method resolveDOIByReferenceNoMatch.

@Test
public void resolveDOIByReferenceNoMatch() throws IOException {
    DOI doi = new DOIResolverImpl().resolveDoiFor("James D. Simons Food habits and trophic structure of the demersal fish assemblages on the Mississippi-Alabama continental shelf");
    assertThat(doi, is(nullValue()));
}
Also used : DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Aggregations

DOI (org.globalbioticinteractions.doi.DOI)74 Test (org.junit.Test)50 StudyImpl (org.eol.globi.domain.StudyImpl)28 IOException (java.io.IOException)15 Study (org.eol.globi.domain.Study)15 Specimen (org.eol.globi.domain.Specimen)13 StudyNode (org.eol.globi.domain.StudyNode)12 Matchers.containsString (org.hamcrest.Matchers.containsString)12 TaxonImpl (org.eol.globi.domain.TaxonImpl)11 URI (java.net.URI)10 LabeledCSVParser (com.Ostermiller.util.LabeledCSVParser)8 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)8 DatasetImpl (org.globalbioticinteractions.dataset.DatasetImpl)8 MalformedDOIException (org.globalbioticinteractions.doi.MalformedDOIException)8 Location (org.eol.globi.domain.Location)7 LocationImpl (org.eol.globi.domain.LocationImpl)7 ArrayList (java.util.ArrayList)6 Dataset (org.globalbioticinteractions.dataset.Dataset)6 Reader (java.io.Reader)5 StringReader (java.io.StringReader)5