OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { public Set<OWLGraphEdge> getOutgoingEdgesNamedClosureOverSupProps(OWLObject s) { return this.getOutgoingEdgesNamedClosureOverSupProps(s, false); } 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 shouldGetNamedClosureOverSuperProps() throws OWLOntologyCreationException, OBOFormatParserException, IOException { ParserWrapper parserWrapper = new ParserWrapper(); OWLOntology ont = parserWrapper.parse(OWLGraphWrapperEdgesExtendedTest.class.getResource( "/graph/superObjectProps.obo").getFile()); OWLGraphWrapper ontWrapper = new OWLGraphWrapper(ont); OWLClass foo1 = ontWrapper.getOWLClassByIdentifier("FOO:0001"); OWLClass foo2 = ontWrapper.getOWLClassByIdentifier("FOO:0002"); OWLClass foo3 = ontWrapper.getOWLClassByIdentifier("FOO:0003"); OWLClass foo4 = ontWrapper.getOWLClassByIdentifier("FOO:0004"); OWLClass foo5 = ontWrapper.getOWLClassByIdentifier("FOO:0005"); OWLClass foo6 = ontWrapper.getOWLClassByIdentifier("FOO:0006"); OWLClass foo7 = ontWrapper.getOWLClassByIdentifier("FOO:0007"); OWLGraphEdge foo2IsAFoo1 = new OWLGraphEdge(foo2, foo1, null, Quantifier.SUBCLASS_OF, ont); OWLObjectProperty partOf = ontWrapper. getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLGraphEdge foo3PartOfFoo1 = new OWLGraphEdge(foo3, foo1, partOf, Quantifier.SOME, ont); OWLObjectProperty fakeRel = ontWrapper. getOWLObjectPropertyByIdentifier("fake_rel1"); OWLGraphEdge foo4ToFoo3 = new OWLGraphEdge(foo4, foo3, fakeRel, Quantifier.SOME, ont); OWLGraphEdge foo4ToFoo1 = new OWLGraphEdge(foo4, foo1, Arrays.asList( new OWLQuantifiedProperty(fakeRel, Quantifier.SOME), new OWLQuantifiedProperty(partOf, Quantifier.SOME)), ont); OWLObjectProperty deepPartOf = ontWrapper. getOWLObjectPropertyByIdentifier("in_deep_part_of"); OWLGraphEdge foo5ToFoo3 = new OWLGraphEdge(foo5, foo3, deepPartOf, Quantifier.SOME, ont); OWLGraphEdge foo5ToFoo1 = new OWLGraphEdge(foo5, foo1, partOf, Quantifier.SOME, ont); OWLObjectProperty developsFrom = ontWrapper. getOWLObjectPropertyByIdentifier("RO:0002202"); OWLGraphEdge foo6ToFoo2 = new OWLGraphEdge(foo6, foo2, deepPartOf, Quantifier.SOME, ont); OWLGraphEdge foo6ToFoo3 = new OWLGraphEdge(foo6, foo3, developsFrom, Quantifier.SOME, ont); OWLGraphEdge foo6ToFoo1 = new OWLGraphEdge(foo6, foo1, deepPartOf, Quantifier.SOME, ont); OWLGraphEdge foo6ToFoo1Bis = new OWLGraphEdge(foo6, foo1, developsFrom, Quantifier.SOME, ont); OWLGraphEdge foo7ToFoo5 = new OWLGraphEdge(foo7, foo5, developsFrom, Quantifier.SOME, ont); OWLGraphEdge foo7ToFoo3 = new OWLGraphEdge(foo7, foo3, developsFrom, Quantifier.SOME, ont); OWLGraphEdge foo7ToFoo1 = new OWLGraphEdge(foo7, foo1, developsFrom, Quantifier.SOME, ont); Set<OWLGraphEdge> expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo2IsAFoo1); assertEquals("Incorrect closure edges for foo2", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo2)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo3PartOfFoo1); assertEquals("Incorrect closure edges for foo3", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo3)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo4ToFoo3); expectedEdges.add(foo4ToFoo1); assertEquals("Incorrect closure edges for foo4", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo4)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo5ToFoo3); expectedEdges.add(foo5ToFoo1); assertEquals("Incorrect closure edges for foo4", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo5)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo6ToFoo3); expectedEdges.add(foo6ToFoo2); expectedEdges.add(foo6ToFoo1); expectedEdges.add(foo6ToFoo1Bis); assertEquals("Incorrect closure edges for foo4", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo6)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(foo7ToFoo5); expectedEdges.add(foo7ToFoo3); expectedEdges.add(foo7ToFoo1); assertEquals("Incorrect closure edges for foo4", expectedEdges, ontWrapper.getOutgoingEdgesNamedClosureOverSupProps(foo7)); }