Search in sources :

Example 31 with DOI

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

the class DOIResolverImplIT method findCitationForDOIEscaped.

@Test
public void findCitationForDOIEscaped() throws IOException {
    String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("1577", "1548-8659(1973)102<511:fhojmf>2.0.co;2"));
    assertThat(citationForDOI, is("Carr WES, Adams CA. Food Habits of Juvenile Marine Fishes Occupying Seagrass Beds in the Estuarine Zone near Crystal River, Florida. Transactions of the American Fisheries Society [Internet]. 1973 July;102(3):511–540. Available from: http://dx.doi.org/10.1577/1548-8659(1973)102<511:fhojmf>2.0.co;2"));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 32 with DOI

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

the class DOIResolverImplIT method resolveDOIBugFixedServerError.

@Test
public void resolveDOIBugFixedServerError() throws IOException {
    String citation = new DOIResolverImpl().findCitationForDOI(new DOI("2307", "4070736"));
    assertThat(citation, is("Anon. McAtee’s “Food Habits of the Grosbeaks” Food Habits of the Grosbeaks W. L. McAtee. The Auk [Internet]. 1908 April;25(2):245–246. Available from: http://dx.doi.org/10.2307/4070736"));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 33 with DOI

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

the class DOIResolverImplIT method resolveBioInfoCitation.

@Test
public void resolveBioInfoCitation() throws IOException {
    DOI doi = new DOIResolverImpl().resolveDoiFor("Galea, V.J. & Price, T.V.. 1988. Infection of Lettuce by Microdochium panattonianum. Transactions of the British Mycological Society. Vol Vol 91 (3). pp 419-425");
    DOI expectedDoi = new DOI("1016", "s0007-1536(88)80117-7");
    assertThat(doi, is(expectedDoi));
    String citation = new DOIResolverImpl().findCitationForDOI(doi);
    assertThat(citation, containsString("Galea VJ, Price TV"));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 34 with DOI

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

the class DOIResolverImplIT method findCitationForShortDOIUpperCase.

@Test
public void findCitationForShortDOIUpperCase() throws IOException, URISyntaxException {
    String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("5962", "bhl.title.2633"));
    assertThat(citationForDOI, is(notNullValue()));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) DOI(org.globalbioticinteractions.doi.DOI) Test(org.junit.Test)

Example 35 with DOI

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

the class DOIResolverImplIT method findCitationForDOITRex.

@Test
public void findCitationForDOITRex() throws IOException {
    String citationForDOI = new DOIResolverImpl().findCitationForDOI(new DOI("1073", "pnas.1216534110"));
    assertThat(citationForDOI, is("DePalma RA, Burnham DA, Martin LD, Rothschild BM, Larson PL. Physical evidence of predatory behavior in Tyrannosaurus rex. Proceedings of the National Academy of Sciences [Internet]. 2013 July 15;110(31):12560–12564. Available from: http://dx.doi.org/10.1073/pnas.1216534110"));
}
Also used : Matchers.containsString(org.hamcrest.Matchers.containsString) 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