OWLGraphWrapperEdgesExtended extends OWLGraphWrapperEdges { OWLQuantifiedProperty combinePropertyPairOverSuperProperties( OWLQuantifiedProperty prop1, OWLQuantifiedProperty prop2) { LinkedHashSet<OWLObjectPropertyExpression> superProps1 = this.getSuperPropertyReflexiveClosureOf(prop1.getProperty()); LinkedHashSet<OWLObjectPropertyExpression> superProps2 = this.getSuperPropertyReflexiveClosureOf(prop2.getProperty()); for (OWLObjectPropertyExpression p1: superProps1) { if (!(p1 instanceof OWLObjectProperty)) { continue; } OWLQuantifiedProperty newQp1 = new OWLQuantifiedProperty(p1, prop1.getQuantifier()); if (!this.isValidQP(newQp1)) { continue; } for (OWLObjectPropertyExpression p2: superProps2) { if (!(p2 instanceof OWLObjectProperty)) { continue; } OWLQuantifiedProperty newQp2 = new OWLQuantifiedProperty(p2, prop2.getQuantifier()); if (!this.isValidQP(newQp2)) { continue; } OWLQuantifiedProperty combined = combinedQuantifiedPropertyPair(newQp1, newQp2); if (combined != null) { return combined; } } } return null; } 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 @Ignore("Disabling test due to lack of resources to debug") public void shouldCombinePropertyPairOverSuperProperties() throws Exception { OWLObjectProperty transf = wrapper.getOWLObjectPropertyByIdentifier( "http: OWLQuantifiedProperty transfQp = new OWLQuantifiedProperty(transf, Quantifier.SOME); OWLObjectProperty devCont = wrapper.getOWLObjectPropertyByIdentifier("RO:0002254"); OWLQuantifiedProperty devContQp = new OWLQuantifiedProperty(devCont, Quantifier.SOME); OWLQuantifiedProperty combine = wrapper.combinePropertyPairOverSuperProperties(transfQp, devContQp); assertEquals("relations SIO:000657 and RO:0002254 were not properly combined " + "into RO:0002254", devContQp, combine); combine = wrapper.combinePropertyPairOverSuperProperties(devContQp, transfQp); assertEquals("Reversing relations in method call generated an error", devContQp, combine); OWLObjectProperty fakeRel3 = wrapper.getOWLObjectPropertyByIdentifier("fake_rel3"); OWLQuantifiedProperty fakeRel3Qp = new OWLQuantifiedProperty(fakeRel3, Quantifier.SOME); OWLObjectProperty fakeRel4 = wrapper.getOWLObjectPropertyByIdentifier("fake_rel4"); OWLQuantifiedProperty fakeRel4Qp = new OWLQuantifiedProperty(fakeRel4, Quantifier.SOME); combine = wrapper.combinePropertyPairOverSuperProperties(fakeRel3Qp, fakeRel4Qp); OWLObjectProperty fakeRel1 = wrapper.getOWLObjectPropertyByIdentifier("fake_rel1"); assertEquals("relations fake_rel3 and fake_rel4 were not properly combined " + "into fake_rel1", fakeRel1, combine.getProperty()); combine = wrapper.combinePropertyPairOverSuperProperties(fakeRel4Qp, fakeRel3Qp); assertEquals("Reversing relations in method call generated an error", fakeRel1, combine.getProperty()); OWLObjectProperty fakeRel5 = wrapper.getOWLObjectPropertyByIdentifier("fake_rel5"); OWLQuantifiedProperty fakeRel5Qp = new OWLQuantifiedProperty(fakeRel5, Quantifier.SOME); OWLObjectProperty partOf = wrapper.getOWLObjectPropertyByIdentifier("BFO:0000050"); OWLQuantifiedProperty partOfQp = new OWLQuantifiedProperty(partOf, Quantifier.SOME); combine = wrapper.combinePropertyPairOverSuperProperties(partOfQp, fakeRel5Qp); OWLObjectProperty dvlpFrom = wrapper.getOWLObjectPropertyByIdentifier("RO:0002202"); assertEquals("relations part_of and fake_rel5 were not properly combined " + "into develops_from", dvlpFrom, combine.getProperty()); OWLObjectProperty deepPartOf = wrapper.getOWLObjectPropertyByIdentifier("in_deep_part_of"); OWLQuantifiedProperty deepPartOfQp = new OWLQuantifiedProperty(deepPartOf, Quantifier.SOME); combine = wrapper.combinePropertyPairOverSuperProperties(deepPartOfQp, fakeRel5Qp); assertEquals("relations in_deep_part_of and fake_rel5 were not properly combined " + "into develops_from", dvlpFrom, combine.getProperty()); combine = wrapper.combinePropertyPairOverSuperProperties(fakeRel3Qp, fakeRel3Qp); assertEquals("relations fake_rel3 and fake_rel3 were not properly combined " + "into fake_rel3", fakeRel3, combine.getProperty()); }