OWLGraphWrapperEdgesAdvanced extends OWLGraphWrapperEdgesExtended implements Closeable { public List<String> getRelationIDClosure(OWLObject c, List<String> relation_ids){ Map<String, String> foo = getRelationClosureMap(c, relation_ids); List<String> bar = new ArrayList<String>(foo.keySet()); return bar; } 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 testClosure() throws Exception { OWLGraphWrapper graph = null; try { graph = getGraph("graph/reg-of-ribosome-biogenesis.owl"); List<String> relations = Arrays.asList("BFO:0000050", "BFO:0000066", "RO:0002211", "RO:0002212", "RO:0002213", "RO:0002215", "RO:0002216"); final OWLClass c1 = graph.getOWLClassByIdentifier("GO:0090069"); assertNotNull(c1); List<String> result = graph.getRelationIDClosure(c1, relations); assertTrue(result.contains("GO:0044087")); assertTrue(result.contains("GO:0008150")); assertTrue(result.contains("GO:0090069")); assertTrue(result.contains("GO:0042254")); assertTrue(result.contains("GO:0044085")); assertTrue(result.contains("GO:0050789")); assertTrue(result.contains("GO:0065007")); assertTrue(result.contains("GO:0022613")); assertTrue(result.contains("GO:0071840")); } finally { IOUtils.closeQuietly(graph); } }