OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { public Set<OWLGraphEdge> getIncomingEdgesWithGCI(OWLObject t) { Set<OWLGraphEdge> edges = super.getIncomingEdges(t); if (t instanceof OWLClass) { edges.addAll(getGCIIncomingEdges((OWLClass) t)); } return edges; } 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 shouldGetIncomingEdgesWithGCI() throws OWLOntologyCreationException, OBOFormatParserException, IOException { ParserWrapper parserWrapper = new ParserWrapper(); OWLOntology ont = parserWrapper.parse(this.getClass().getResource( "/graph/gciRelRetrieval.obo").getFile()); OWLGraphWrapper wrapper = new OWLGraphWrapper(ont); OWLObjectProperty partOf = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLObjectProperty developsFrom = wrapper.getOWLObjectPropertyByIdentifier("RO:0002202"); OWLClass cls8 = wrapper.getOWLClassByIdentifier("ID:8"); OWLClass cls4 = wrapper.getOWLClassByIdentifier("ID:4"); OWLClass cls10 = wrapper.getOWLClassByIdentifier("ID:10"); OWLClass cls6 = wrapper.getOWLClassByIdentifier("ID:6"); OWLClass taxon1 = wrapper.getOWLClassByIdentifier("NCBITaxon:10090"); Set<OWLGraphEdge> expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(new OWLGraphEdge(cls6, cls4, partOf, Quantifier.SOME, ont, null)); assertEquals("Incorrect incoming edges with GCI retrieved", expectedEdges, wrapper.getIncomingEdgesWithGCI(cls4)); expectedEdges = new HashSet<OWLGraphEdge>(); expectedEdges.add(new OWLGraphEdge(cls8, cls6, partOf, Quantifier.SOME, ont, null)); expectedEdges.add(new OWLGraphEdge(cls10, cls6, developsFrom, Quantifier.SOME, ont, null, taxon1, partOf)); assertEquals("Incorrect incoming edges with GCI retrieved", expectedEdges, wrapper.getIncomingEdgesWithGCI(cls6)); }