Skip to content

Commit

Permalink
Expand semantic annotation property SPARQL query
Browse files Browse the repository at this point in the history
Ref #31
  • Loading branch information
amoeba committed Oct 8, 2021
1 parent 976a812 commit f7c1a9d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
SELECT ?annotation_property_uri
WHERE {
<$CONCEPT_URI> rdfs:subPropertyOf* ?annotation_property_uri .
<$CONCEPT_URI> (owl:equivalentProperty|^owl:equivalentProperty)*/rdfs:subPropertyOf* ?annotation_property_uri .
}
]]>
</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,21 @@ public void testNamedIndividualExpansion() {
fail(e.getMessage());
}
}

@Test
public void testEquivalentPropertyExpansion() {
try {
Map<String, Set<String>> concepts = OntologyModelService.getInstance().expandConcepts("https://purl.dataone.org/odo/MOSAIC_00002250");

Set<String> values = new HashSet<String>();
values.add("http://www.w3.org/ns/ssn/deployedSystem");
values.add("https://purl.dataone.org/odo/MOSAIC_00002250");

assertEquals(values, concepts.get("annotation_property_uri"));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
fail(e.getMessage());
}
}
}

0 comments on commit f7c1a9d

Please sign in to comment.