OWLGraphWrapperEdgesAdvanced extends OWLGraphWrapperEdgesExtended implements Closeable { Set<OWLClass> getSvfClasses(OWLClass c, OWLObjectProperty p) { Set<OWLSubClassOfAxiom> axioms = new HashSet<OWLSubClassOfAxiom>(); for(OWLOntology ont : getAllOntologies()) { axioms.addAll(ont.getSubClassAxiomsForSubClass(c)); } Set<OWLClass> superClasses = new HashSet<OWLClass>(); for (OWLSubClassOfAxiom axiom : axioms) { OWLClassExpression expr = axiom.getSuperClass(); if (expr instanceof OWLObjectSomeValuesFrom) { OWLObjectSomeValuesFrom svf = (OWLObjectSomeValuesFrom) expr; if (p.equals(svf.getProperty())) { OWLClassExpression filler = svf.getFiller(); if (filler instanceof OWLClass) { superClasses.add((OWLClass) filler); } } } } return superClasses; } protected  OWLGraphWrapperEdgesAdvanced(OWLOntology ontology); protected  OWLGraphWrapperEdgesAdvanced(String iri); void setEdgesAdvancedCacheSize(int size); long getCurrentEdgesAdvancedCacheSize(); synchronized void addPropertyForMaterialization(OWLObjectProperty p); synchronized void addPropertiesForMaterialization(Iterable<OWLObjectProperty> properties); synchronized void addPropertyIdsForMaterialization(Iterable<String> propertyIds); @Override synchronized void close(); Set<OWLObjectProperty> relationshipIDsToPropertySet(List<String> relation_ids); String classifyRelationship(OWLGraphEdge owlGraphEdge, OWLObject edgeDirector, Set<? extends OWLPropertyExpression> props); OWLShuntGraph addStepwiseAncestorsToShuntGraph(OWLObject x, OWLShuntGraph g, List<String> rel_ids); OWLShuntGraph addTransitiveAncestorsToShuntGraph(OWLObject x, OWLShuntGraph g, List<String> rel_ids); OWLShuntGraph addDirectDescendentsToShuntGraph(OWLObject x, OWLShuntGraph g, List<String> rel_ids); OWLShuntGraph getSegmentShuntGraph(OWLObject x, List<String> rel_ids); OWLShuntGraph getLineageShuntGraph(OWLObject x, List<String> rel_ids); String getSegmentShuntGraphJSON(OWLObject x, List<String> sargs); String getLineageShuntGraphJSON(OWLObject x, List<String> sargs); Map<String,String> getRelationClosureMap(OWLObject c, final List<String> relation_ids); Map<String,String> getRelationClosureMapEngine(OWLObject obj, List<String> relation_ids); @Deprecated Map<String,String> getIsaPartofClosureMap(OWLObject c); @Deprecated List<String> getIsaPartofIDClosure(OWLObject c); @Deprecated List<String> getIsaPartofIDClosure(OWLObject c, List<String> sargs); List<String> getRelationIDClosure(OWLObject c, List<String> relation_ids); @Deprecated List<String> getIsaPartofLabelClosure(OWLObject c); @Deprecated List<String> getIsaPartofLabelClosure(OWLObject c, List<String> sargs); List<String> getRelationLabelClosure(OWLObject c, List<String> relation_ids); @Deprecated String[] getSubClassesNames(OWLClass cls); String categorizeNamespace(OWLObject c, Map<String, Object> configuration); String categorizeObject(OWLNamedObject named,  Map<String,String> idspaceMappings, 
			Set<String> useNamespace, boolean useFallback); String getDummyString(OWLObject c, List<String> sargs); List<String> getDummyStrings(OWLObject c, List<String> sargs); Set<String> getOnlyInTaxon(OWLObject x, List<String> sargs); Set<String> getOnlyInTaxonLabels(OWLObject x, List<String> sargs); Map<String, String> getOnlyInTaxonLabelMap(OWLObject x, List<String> sargs); Set<String> getOnlyInTaxonClosure(OWLObject x, List<String> relation_ids); Set<String> getOnlyInTaxonClosureLabels(OWLObject x, List<String> relation_ids); OWLShuntGraph getNeighbors(OWLObject x, List<String> sargs); String getNeighborsJSON(OWLObject x, List<String> sargs); String getNeighborsLimitedJSON(OWLObject x, List<String> sargs); OWLShuntGraph getNeighborsLimited(OWLObject x, int edgeLimit); OWLShuntGraph getNeighbors(OWLObject x);  }
@Test public void testGetSvfClasses() throws Exception { OWLGraphWrapper graph = getGraph("graph/explainConstraints.owl"); IRI onlyInTaxonIRI = IRI.create("http: OWLObjectProperty onlyInTaxon = graph.getDataFactory().getOWLObjectProperty(onlyInTaxonIRI); OWLClass c1 = graph.getOWLClass(IRI.create("http: OWLClass c2 = graph.getOWLClass(IRI.create("http: OWLClass c3 = graph.getOWLClass(IRI.create("http: Set<OWLClass> svf1 = graph.getSvfClasses(c1, onlyInTaxon); Set<OWLClass> svf2 = graph.getSvfClasses(c2, onlyInTaxon); Set<OWLClass> svf3 = graph.getSvfClasses(c3, onlyInTaxon); assertEquals(1, svf1.size()); assertEquals(1, svf2.size()); assertEquals(0, svf3.size()); }