| java.lang.Object jena.examples.ontology.describeClass.DescribeClass
DescribeClass | public class DescribeClass (Code) | |
Simple example of describing the basic attributes of a OWL, DAML or RDFS class
using the ontology API. This is not meant as a definitive solution to the problem,
but as an illustration of one approach to solving the problem. This example should
be adapted as necessary to provide a given application with the means to render
a class description in a readable form.
author: Ian Dickinson, HP Labs author: (email) version: CVS $Id: DescribeClass.java,v 1.1 2005/10/06 17:49:06 andy_seaborne Exp $ |
Method Summary | |
public void | describeClass(PrintStream out, OntClass cls) Describe the given ontology class in texttual form. | protected PrefixMapping | prefixesFor(Resource n) | protected void | renderAnonymous(PrintStream out, Resource anon, String name) | protected void | renderBooleanClass(PrintStream out, String op, BooleanClassDescription boolClass) | public void | renderClassDescription(PrintStream out, OntClass c) | protected void | renderRestriction(PrintStream out, Restriction r) | protected void | renderRestrictionElem(PrintStream out, String desc, RDFNode value) | protected void | renderURI(PrintStream out, PrefixMapping prefixes, String uri) | protected void | renderValue(PrintStream out, RDFNode value) |
describeClass | public void describeClass(PrintStream out, OntClass cls)(Code) | | Describe the given ontology class in texttual form. The description
produced has the following form (approximately):
Class foo:Bar
is a sub-class of foo:A, ex:B
is a super-class of ex:C
Parameters: out - The print stream to write the description to Parameters: cls - The ontology class to describe |
renderClassDescription | public void renderClassDescription(PrintStream out, OntClass c)(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 |
|
|