diff --git a/src/main/resources/application-context-ontology-model-service.xml b/src/main/resources/application-context-ontology-model-service.xml index 1d4d58b8..de7dd0c7 100644 --- a/src/main/resources/application-context-ontology-model-service.xml +++ b/src/main/resources/application-context-ontology-model-service.xml @@ -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 . } ]]> diff --git a/src/test/java/org/dataone/cn/indexer/annotation/OntologyModelServiceTest.java b/src/test/java/org/dataone/cn/indexer/annotation/OntologyModelServiceTest.java index 3b77812e..e1954e69 100644 --- a/src/test/java/org/dataone/cn/indexer/annotation/OntologyModelServiceTest.java +++ b/src/test/java/org/dataone/cn/indexer/annotation/OntologyModelServiceTest.java @@ -200,4 +200,21 @@ public void testNamedIndividualExpansion() { fail(e.getMessage()); } } + + @Test + public void testEquivalentPropertyExpansion() { + try { + Map> concepts = OntologyModelService.getInstance().expandConcepts("https://purl.dataone.org/odo/MOSAIC_00002250"); + + Set values = new HashSet(); + 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()); + } + } }