| java.lang.Object jena.examples.ontology.classHierarchy.ClassHierarchy
ClassHierarchy | public class ClassHierarchy (Code) | |
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.
author: Ian Dickinson, HP Labs author: (email) version: CVS $Id: ClassHierarchy.java,v 1.1 2005/10/06 17:49:07 andy_seaborne Exp $ |
Method Summary | |
protected void | indent(PrintStream out, int depth) | protected void | renderAnonymous(PrintStream out, Resource anon, String name) | public void | renderClassDescription(PrintStream out, OntClass c, int depth) | protected void | renderRestriction(PrintStream out, Restriction r) | protected void | renderURI(PrintStream out, PrefixMapping prefixes, String uri) | protected void | showClass(PrintStream out, OntClass cls, List occurs, int depth) Present a class, then recurse down to the sub-classes. | public void | showHierarchy(PrintStream out, OntModel m) |
indent | protected void indent(PrintStream out, int depth)(Code) | | Generate the indentation
|
renderClassDescription | public void renderClassDescription(PrintStream out, OntClass c, int depth)(Code) | | Render a description of the given class to the given output stream.
Parameters: out - A print stream to write to Parameters: c - The class to render |
renderRestriction | protected void renderRestriction(PrintStream out, Restriction r)(Code) | | Handle the case of rendering a restriction.
Parameters: out - The print stream to write to Parameters: r - The restriction to render |
showClass | protected void showClass(PrintStream out, OntClass cls, List occurs, int depth)(Code) | | Present a class, then recurse down to the sub-classes.
Use occurs check to prevent getting stuck in a loop
|
showHierarchy | public void showHierarchy(PrintStream out, OntModel m)(Code) | | Show the sub-class hierarchy encoded by the given model
|
|
|