OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { public OWLGraphEdge combineEdgePairWithSuperPropsAndGCI(OWLGraphEdge firstEdge, OWLGraphEdge secondEdge) { OWLGraphEdge combine = this.combineEdgePairWithGCI( firstEdge.getSource(), firstEdge, secondEdge, 0); if (combine != null) { if (combine.getQuantifiedPropertyList().size() == 2) { OWLQuantifiedProperty combinedQp = this.combinePropertyPairOverSuperProperties( combine.getQuantifiedPropertyList().get(0), combine.getQuantifiedPropertyList().get(1)); if (combinedQp != null) { List<OWLQuantifiedProperty> qps = new ArrayList<OWLQuantifiedProperty>(); qps.add(combinedQp); combine = this.createMergedEdgeWithGCI(firstEdge.getSource(), firstEdge, secondEdge); if (combine != null) { combine.setQuantifiedPropertyList(qps); } } } } return combine; } 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 shouldCombineEdgePairWithSuperPropsAndGCI() { OWLOntology ont = wrapper.getSourceOntology(); OWLClass source = wrapper.getOWLClassByIdentifier("FOO:0001"); OWLClass target = wrapper.getOWLClassByIdentifier("FOO:0002"); OWLClass target2 = wrapper.getOWLClassByIdentifier("FOO:0003"); OWLClass rootTaxon = wrapper.getOWLClassByIdentifier("NCBITaxon:1"); OWLClass taxon1 = wrapper.getOWLClassByIdentifier("NCBITaxon:9606"); OWLClass taxon2 = wrapper.getOWLClassByIdentifier("NCBITaxon:10090"); OWLObjectProperty overlaps = wrapper.getOWLObjectPropertyByIdentifier("RO:0002131"); OWLObjectProperty partOf = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLGraphEdge edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont); OWLGraphEdge edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont); OWLGraphEdge expectedEdge = new OWLGraphEdge(source, target2, overlaps, Quantifier.SOME, ont); assertEquals("Incorrect combined relation", expectedEdge, wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, taxon1, partOf); expectedEdge = new OWLGraphEdge(source, target2, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); assertEquals("Incorrect combined relation", expectedEdge, wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, rootTaxon, partOf); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, taxon1, partOf); expectedEdge = new OWLGraphEdge(source, target2, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); assertEquals("Incorrect combined relation", expectedEdge, wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, taxon1, overlaps); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, taxon1, partOf); expectedEdge = new OWLGraphEdge(source, target2, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); assertEquals("Incorrect combined relation", expectedEdge, wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, rootTaxon, overlaps); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, taxon1, partOf); expectedEdge = new OWLGraphEdge(source, target2, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); assertEquals("Incorrect combined relation", expectedEdge, wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, taxon1, overlaps); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, rootTaxon, partOf); assertNull("Incorrect combined relation", wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); edge1 = new OWLGraphEdge(source, target, overlaps, Quantifier.SOME, ont, null, taxon1, partOf); edge2 = new OWLGraphEdge(target, target2, partOf, Quantifier.SOME, ont, null, taxon2, partOf); assertNull("Incorrect combined relation", wrapper.combineEdgePairWithSuperPropsAndGCI(edge1, edge2)); }