OWLGraphWrapperEdgesAdvanced extends OWLGraphWrapperEdgesExtended implements Closeable { public OWLShuntGraph getSegmentShuntGraph(OWLObject x, List<String> rel_ids) { OWLShuntGraph graphSegment = new OWLShuntGraph(); String topicID = getIdentifier(x); String topicLabel = getLabel(x); OWLShuntNode tn = new OWLShuntNode(topicID, topicLabel); graphSegment.addNode(tn); graphSegment = addStepwiseAncestorsToShuntGraph(x, graphSegment, rel_ids); graphSegment = addDirectDescendentsToShuntGraph(x, graphSegment, rel_ids); return graphSegment; } 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 testGetSegmentShuntGraph() throws Exception { String id = "GO:1990086"; OWLGraphWrapper graph = getGraph("graph/lf-apoptosis.obo"); OWLObject x = graph.getOWLObjectByIdentifier(id); List<String> rel_ids = new ArrayList<String>(); rel_ids.add("BFO:0000050"); rel_ids.add("BFO:0000066"); rel_ids.add("RO:0002211"); rel_ids.add("RO:0002212"); rel_ids.add("RO:0002213"); rel_ids.add("RO:0002215"); rel_ids.add("RO:0002216"); System.out.println("Getting segment shunt graph for "+x); OWLShuntGraph shug = graph.getSegmentShuntGraph(x, rel_ids); Set<String> parents = shug.getParents(id); for (String p : parents) { System.out.println(" actual child: "+p); } Set<String> children = shug.getChildren(id); int nOk = 0; for (String c : children) { System.out.println(" actual parent: "+c); if (c.equals("GO:1904019")) { nOk++; } else if (c.equals("CL:0011004")) { nOk++; } else { fail("Did not expect "+c+" as an actual parent"); } } System.out.println(children); assertEquals(2, children.size()); }