OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { public LinkedHashSet<OWLGraphEdge> getOWLGraphEdgeSubRelsReflexive(OWLGraphEdge edge) { return this.getOWLGraphEdgeSubRelsReflexive(edge, 0); } OWLGraphWrapperEdgesExtended(OWLOntology ontology); protected  OWLGraphWrapperEdgesExtended(String iri); boolean isOWLObjectInSubsets(OWLObject testObject, Collection<String> subsets); Set<OWLAnnotationProperty> getSubAnnotationPropertiesOf(
            OWLAnnotationProperty prop); LinkedHashSet<OWLAnnotationProperty> getSubAnnotationPropertyClosureOf(
            OWLAnnotationProperty prop); LinkedHashSet<OWLAnnotationProperty> getSubAnnotationPropertyReflexiveClosureOf(
            OWLAnnotationProperty prop); Set<OWLObjectPropertyExpression> getSubPropertiesOf(
			OWLObjectPropertyExpression prop); LinkedHashSet<OWLObjectPropertyExpression> getSubPropertyClosureOf(
			OWLObjectPropertyExpression prop); LinkedHashSet<OWLObjectPropertyExpression> getSubPropertyReflexiveClosureOf(
			OWLObjectPropertyExpression prop); LinkedHashSet<OWLObjectPropertyExpression> getSuperPropertyReflexiveClosureOf(
    		OWLObjectPropertyExpression prop); LinkedHashSet<OWLGraphEdge> getOWLGraphEdgeSubRelsReflexive(OWLGraphEdge edge); OWLGraphEdge combineEdgePairWithSuperPropsAndGCI(OWLGraphEdge firstEdge, 
    		OWLGraphEdge secondEdge); Set<OWLGraphEdge> getOutgoingEdgesNamedClosureOverSupProps(OWLObject s); Set<OWLGraphEdge> getOutgoingEdgesNamedClosureOverSupPropsWithGCI(OWLObject s); Set<OWLGraphEdge> getOutgoingEdgesClosureWithGCI(OWLObject s); Set<OWLGraphEdge> getGCIOutgoingEdges(OWLClass s); Set<OWLGraphEdge> getGCIOutgoingEdges(OWLClass s, 
            Set<OWLPropertyExpression> overProps); Set<OWLGraphEdge> getGCIIncomingEdges(OWLClass t); Set<OWLGraphEdge> getOutgoingEdgesWithGCI(OWLObject s); Set<OWLGraphEdge> getOutgoingEdgesWithGCI(OWLObject s, 
            Set<OWLPropertyExpression> overProperties); Set<OWLGraphEdge> getIncomingEdgesWithGCI(OWLObject t); Set<OWLNamedObject> getNamedAncestorsWithGCI(OWLObject sourceObject); Set<OWLNamedObject> getNamedAncestorsWithGCI(OWLObject sourceObject, 
            @SuppressWarnings("rawtypes") Set<OWLPropertyExpression> overProps); Set<OWLClass> getOWLClassAncestorsWithGCI(OWLObject sourceObject); Set<OWLClass> getOWLClassDirectDescendantsWithGCI(OWLClass parentClass); Set<OWLClass> getOWLClassDescendantsWithGCI(OWLClass parentClass); Set<OWLClass> getOWLClassDescendantsWithGCI(OWLClass parentClass, 
            @SuppressWarnings("rawtypes") Set<OWLPropertyExpression> overProps); OWLGraphEdge combineEdgePairWithGCI(OWLObject s, OWLGraphEdge ne, 
            OWLGraphEdge extEdge, int nextDist); boolean hasFirstEdgeMoreGeneralGCIParams(OWLGraphEdge firstEdge, 
            OWLGraphEdge otherEdge); Set<OWLClass> getAncestorsThroughIsA(OWLObject x); Set<OWLClass> getDescendantsThroughIsA(OWLObject x); @Override void clearCachedEdges(); OWLObject edgeToSourceExpression(OWLGraphEdge e); Set<OWLClass> getAllRealOWLClasses(); Set<OWLClass> getAllRealOWLClassesFromSource(); Set<OWLClass> getOntologyRoots(); Set<OWLClass> getOntologyRoots(Set<OWLPropertyExpression> overProperties); Set<OWLClass> getOntologyLeaves(); Set<OWLClass> getOWLClassDescendants(OWLClass parentClass); Set<OWLClass> getOWLClassDirectDescendants(OWLClass parentClass); Set<OWLClass> getOWLClassDirectAncestors(OWLClass subClass); Set<OWLClass> getOWLClassAncestors(OWLClass sourceClass); boolean isRealClass(OWLObject object);  }
@Test public void shouldGetOWLGraphEdgeSubRelsReflexive() { OWLOntology ont = wrapper.getSourceOntology(); OWLClass source = wrapper.getOWLClassByIdentifier("FOO:0001"); OWLClass target = wrapper.getOWLClassByIdentifier("FOO:0002"); OWLObjectProperty overlaps = wrapper.getOWLObjectPropertyByIdentifier("RO:0002131"); OWLObjectProperty partOf = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLObjectProperty hasPart = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000051"); OWLObjectProperty inDeepPartOf = wrapper.getOWLObjectPropertyByIdentifier("in_deep_part_of"); OWLGraphEdge sourceEdge = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont); OWLGraphEdge partOfEdge = new OWLGraphEdge(source, target, partOf, Quantifier.SOME, ont); OWLGraphEdge hasPartEdge = new OWLGraphEdge(source, target, hasPart, Quantifier.SOME, ont); OWLGraphEdge deepPartOfEdge = new OWLGraphEdge(source, target, inDeepPartOf, Quantifier.SOME, ont); LinkedHashSet<OWLGraphEdge> subRels = wrapper.getOWLGraphEdgeSubRelsReflexive(sourceEdge); int edgeIndex = 0; for (OWLGraphEdge edge: subRels) { if (edgeIndex == 0) { assertEquals("Incorrect sub-rels returned at index 0", sourceEdge, edge); } else if (edgeIndex == 1 || edgeIndex == 2) { assertTrue("Incorrect sub-rels returned at index 1 or 2: " + edge, edge.equals(partOfEdge) || edge.equals(hasPartEdge)); } else if (edgeIndex == 3) { assertEquals("Incorrect sub-rels returned at index 3", deepPartOfEdge, edge); } edgeIndex++; } assertTrue("No sub-relations returned", edgeIndex > 0); }