Skip to content

Commit

Permalink
more plazi related code; globalbioticinteractions/nomer#23
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpoelen committed Sep 25, 2020
1 parent ce2379e commit 2c1a354
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Expand Up @@ -29,7 +29,8 @@ public enum TaxonomyProvider {
BATPLANT("batbase:taxon:"),
OPEN_BIODIV("http://openbiodiv.net/"),
MSW("MSW:", "http://www.departments.bucknell.edu/biology/resources/msw3/browse.asp?s=y&id="),
GULFBASE("BioGoMx:"), PLAZI("PLAZI:", "http://treatment.plazi.org/id/");
GULFBASE("BioGoMx:"),
PLAZI("PLAZI:", "http://treatment.plazi.org/id/");

private final List<String> idPrefixes;

Expand Down
Expand Up @@ -55,6 +55,19 @@ public void createITISLionQuery() {
"} limit 1"));
}

@Test
public void createPlaziRhinolophusDentiQuery() {
String sparqlQuery = WikidataUtil.createSparqlQuery("PLAZI:885887A2FFC88A21F8B1FA48FB92DD65", "en");
assertThat(sparqlQuery, is("SELECT ?item ?pic ?name ?wdpage WHERE {\n" +
" ?wdpage wdt:P18 ?pic .\n" +
" ?wdpage wdt:P1992 \"885887A2FFC88A21F8B1FA48FB92DD65\" .\n" +
" SERVICE wikibase:label {\n" +
" bd:serviceParam wikibase:language \"en\" .\n" +
" ?wdpage wdt:P1843 ?name .\n" +
" }\n" +
"} limit 1"));
}

@Test
public void createWikiDataLionQuery() {
String sparqlQuery = WikidataUtil.createSparqlQuery("WD:Q140", "en");
Expand Down

0 comments on commit 2c1a354

Please sign in to comment.