|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ge.grc.acuity.ClassHierarchy
This is a modification of the ClassHierarchy created by Ian Dickson, HP Labs Bristol, with the optional display of Individuals of the Class type added. Simple demonstration program to show how to list a hierarchy of classes. This is not a complete solution to the problem (sub-classes of restrictions, for example, are not shown). It is inteded only to be illustrative of the general approach.
| Constructor Summary | |
ClassHierarchy()
|
|
| Method Summary | |
protected void |
indent(java.io.PrintStream out,
int depth)
Generate the indentation |
protected void |
renderAnonymous(java.io.PrintStream out,
com.hp.hpl.jena.rdf.model.Resource anon,
java.lang.String name)
Render an anonymous class or restriction |
void |
renderClassDescription(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntClass c,
int depth,
boolean bShowIndividuals)
Render a description of the given class to the given output stream. |
protected void |
renderRestriction(java.io.PrintStream out,
com.hp.hpl.jena.ontology.Restriction r)
Handle the case of rendering a restriction. |
protected void |
renderURI(java.io.PrintStream out,
com.hp.hpl.jena.shared.PrefixMapping prefixes,
java.lang.String uri)
Render a URI |
protected java.util.Iterator |
rootClasses(com.hp.hpl.jena.ontology.OntModel m)
Answer an iterator over the classes we will use as the roots of the depicted hierarchy. |
protected void |
showClass(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntClass cls,
java.util.List occurs,
int depth,
boolean bShowIndividuals)
Present a class, then recurse down to the sub-classes. |
void |
showHierarchy(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntModel m,
boolean bShowIndividuals)
Show the sub-class hierarchy encoded by the given model |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClassHierarchy()
| Method Detail |
public void showHierarchy(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntModel m,
boolean bShowIndividuals)
protected void showClass(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntClass cls,
java.util.List occurs,
int depth,
boolean bShowIndividuals)
public void renderClassDescription(java.io.PrintStream out,
com.hp.hpl.jena.ontology.OntClass c,
int depth,
boolean bShowIndividuals)
Render a description of the given class to the given output stream.
out - A print stream to write toc - The class to render
protected void renderRestriction(java.io.PrintStream out,
com.hp.hpl.jena.ontology.Restriction r)
Handle the case of rendering a restriction.
out - The print stream to write tor - The restriction to render
protected void renderURI(java.io.PrintStream out,
com.hp.hpl.jena.shared.PrefixMapping prefixes,
java.lang.String uri)
protected void renderAnonymous(java.io.PrintStream out,
com.hp.hpl.jena.rdf.model.Resource anon,
java.lang.String name)
protected void indent(java.io.PrintStream out,
int depth)
protected java.util.Iterator rootClasses(com.hp.hpl.jena.ontology.OntModel m)
m - A model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||