org.semanticweb.owl.util
Class SimpleRenderer

java.lang.Object
  extended by org.semanticweb.owl.util.SimpleRenderer
All Implemented Interfaces:
OWLObjectRenderer, OWLAnnotationVisitor, OWLAxiomVisitor, OWLDataVisitor, OWLDescriptionVisitor, OWLEntityVisitor, OWLObjectVisitor, OWLPropertyExpressionVisitor, SWRLObjectVisitor

public class SimpleRenderer
extends java.lang.Object
implements OWLObjectVisitor, OWLObjectRenderer

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 26-Nov-2006

A simple renderer that can be used for debugging purposes and provide an implementation of the toString method for different implementations.


Constructor Summary
SimpleRenderer()
           
 
Method Summary
protected  void append(java.lang.String s)
           
 java.lang.String render(OWLObject object)
          Renders the specified object.
protected  void render(java.util.Set<? extends OWLObject> objects)
           
 void reset()
           
 void setShortFormProvider(ShortFormProvider shortFormProvider)
          Sets the short form provider, which determines the short form that should be used for entities.
 java.lang.String toString()
           
 void visit(OWLAntiSymmetricObjectPropertyAxiom axiom)
           
 void visit(OWLAxiomAnnotationAxiom axiom)
           
 void visit(OWLClass desc)
           
 void visit(OWLClassAssertionAxiom axiom)
           
 void visit(OWLConstantAnnotation annotation)
           
 void visit(OWLDataAllRestriction desc)
           
 void visit(OWLDataComplementOf node)
           
 void visit(OWLDataExactCardinalityRestriction desc)
           
 void visit(OWLDataMaxCardinalityRestriction desc)
           
 void visit(OWLDataMinCardinalityRestriction desc)
           
 void visit(OWLDataOneOf node)
           
 void visit(OWLDataProperty property)
           
 void visit(OWLDataPropertyAssertionAxiom axiom)
           
 void visit(OWLDataPropertyDomainAxiom axiom)
           
 void visit(OWLDataPropertyRangeAxiom axiom)
           
 void visit(OWLDataRangeFacetRestriction node)
           
 void visit(OWLDataRangeRestriction node)
           
 void visit(OWLDataSomeRestriction desc)
           
 void visit(OWLDataSubPropertyAxiom axiom)
           
 void visit(OWLDataType node)
           
 void visit(OWLDataValueRestriction desc)
           
 void visit(OWLDeclarationAxiom axiom)
           
 void visit(OWLDifferentIndividualsAxiom axiom)
           
 void visit(OWLDisjointClassesAxiom axiom)
           
 void visit(OWLDisjointDataPropertiesAxiom axiom)
           
 void visit(OWLDisjointObjectPropertiesAxiom axiom)
           
 void visit(OWLDisjointUnionAxiom axiom)
           
 void visit(OWLEntityAnnotationAxiom axiom)
           
 void visit(OWLEquivalentClassesAxiom axiom)
           
 void visit(OWLEquivalentDataPropertiesAxiom axiom)
           
 void visit(OWLEquivalentObjectPropertiesAxiom axiom)
           
 void visit(OWLFunctionalDataPropertyAxiom axiom)
           
 void visit(OWLFunctionalObjectPropertyAxiom axiom)
           
 void visit(OWLImportsDeclaration axiom)
           
 void visit(OWLIndividual individual)
           
 void visit(OWLInverseFunctionalObjectPropertyAxiom axiom)
           
 void visit(OWLInverseObjectPropertiesAxiom axiom)
           
 void visit(OWLIrreflexiveObjectPropertyAxiom axiom)
           
 void visit(OWLNegativeDataPropertyAssertionAxiom axiom)
           
 void visit(OWLNegativeObjectPropertyAssertionAxiom axiom)
           
 void visit(OWLObjectAllRestriction desc)
           
 void visit(OWLObjectAnnotation annotation)
           
 void visit(OWLObjectComplementOf desc)
           
 void visit(OWLObjectExactCardinalityRestriction desc)
           
 void visit(OWLObjectIntersectionOf desc)
           
 void visit(OWLObjectMaxCardinalityRestriction desc)
           
 void visit(OWLObjectMinCardinalityRestriction desc)
           
 void visit(OWLObjectOneOf desc)
           
 void visit(OWLObjectProperty property)
           
 void visit(OWLObjectPropertyAssertionAxiom axiom)
           
 void visit(OWLObjectPropertyChainSubPropertyAxiom axiom)
           
 void visit(OWLObjectPropertyDomainAxiom axiom)
           
 void visit(OWLObjectPropertyInverse property)
           
 void visit(OWLObjectPropertyRangeAxiom axiom)
           
 void visit(OWLObjectSelfRestriction desc)
           
 void visit(OWLObjectSomeRestriction desc)
           
 void visit(OWLObjectSubPropertyAxiom axiom)
           
 void visit(OWLObjectUnionOf desc)
           
 void visit(OWLObjectValueRestriction desc)
           
 void visit(OWLOntology ontology)
           
 void visit(OWLOntologyAnnotationAxiom axiom)
           
 void visit(OWLReflexiveObjectPropertyAxiom axiom)
           
 void visit(OWLSameIndividualsAxiom axiom)
           
 void visit(OWLSubClassAxiom axiom)
           
 void visit(OWLSymmetricObjectPropertyAxiom axiom)
           
 void visit(OWLTransitiveObjectPropertyAxiom axiom)
           
 void visit(OWLTypedConstant node)
           
 void visit(OWLUntypedConstant node)
           
 void visit(SWRLAtomConstantObject node)
           
 void visit(SWRLAtomDVariable node)
           
 void visit(SWRLAtomIndividualObject node)
           
 void visit(SWRLAtomIVariable node)
           
 void visit(SWRLBuiltInAtom node)
           
 void visit(SWRLClassAtom node)
           
 void visit(SWRLDataRangeAtom node)
           
 void visit(SWRLDataValuedPropertyAtom node)
           
 void visit(SWRLDifferentFromAtom node)
           
 void visit(SWRLObjectPropertyAtom node)
           
 void visit(SWRLRule rule)
           
 void visit(SWRLSameAsAtom node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleRenderer

public SimpleRenderer()
Method Detail

reset

public void reset()

setShortFormProvider

public void setShortFormProvider(ShortFormProvider shortFormProvider)
Description copied from interface: OWLObjectRenderer
Sets the short form provider, which determines the short form that should be used for entities.

Specified by:
setShortFormProvider in interface OWLObjectRenderer
Parameters:
shortFormProvider - The short form provider to be used.

append

protected void append(java.lang.String s)

render

public java.lang.String render(OWLObject object)
Description copied from interface: OWLObjectRenderer
Renders the specified object.

Specified by:
render in interface OWLObjectRenderer
Parameters:
object - The object to be rendered.
Returns:
A string that represents the rendering of the object.

render

protected void render(java.util.Set<? extends OWLObject> objects)

visit

public void visit(OWLOntology ontology)
Specified by:
visit in interface OWLObjectVisitor

visit

public void visit(OWLOntologyAnnotationAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLSubClassAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLAntiSymmetricObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLReflexiveObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDisjointClassesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDataPropertyDomainAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLImportsDeclaration axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLAxiomAnnotationAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLObjectPropertyDomainAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLEquivalentObjectPropertiesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLNegativeDataPropertyAssertionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDifferentIndividualsAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDisjointDataPropertiesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDisjointObjectPropertiesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLObjectPropertyRangeAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLObjectPropertyAssertionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLFunctionalObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLObjectSubPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDisjointUnionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDeclarationAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLEntityAnnotationAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLSymmetricObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDataPropertyRangeAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLFunctionalDataPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLEquivalentDataPropertiesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLClassAssertionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLEquivalentClassesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDataPropertyAssertionAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLTransitiveObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLIrreflexiveObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLDataSubPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLInverseFunctionalObjectPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLSameIndividualsAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLObjectPropertyChainSubPropertyAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLClass desc)
Specified by:
visit in interface OWLDescriptionVisitor
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLObjectIntersectionOf desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectUnionOf desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectComplementOf desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectSomeRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectAllRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectValueRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectMinCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectExactCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectMaxCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectSelfRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLObjectOneOf desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataSomeRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataAllRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataValueRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataMinCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataExactCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataMaxCardinalityRestriction desc)
Specified by:
visit in interface OWLDescriptionVisitor

visit

public void visit(OWLDataType node)
Specified by:
visit in interface OWLDataVisitor
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLDataComplementOf node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLDataOneOf node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLDataRangeRestriction node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLDataRangeFacetRestriction node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLTypedConstant node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLUntypedConstant node)
Specified by:
visit in interface OWLDataVisitor

visit

public void visit(OWLObjectProperty property)
Specified by:
visit in interface OWLEntityVisitor
Specified by:
visit in interface OWLPropertyExpressionVisitor

visit

public void visit(OWLObjectPropertyInverse property)
Specified by:
visit in interface OWLPropertyExpressionVisitor

visit

public void visit(OWLDataProperty property)
Specified by:
visit in interface OWLEntityVisitor
Specified by:
visit in interface OWLPropertyExpressionVisitor

visit

public void visit(OWLIndividual individual)
Specified by:
visit in interface OWLEntityVisitor

visit

public void visit(OWLInverseObjectPropertiesAxiom axiom)
Specified by:
visit in interface OWLAxiomVisitor

visit

public void visit(OWLConstantAnnotation annotation)
Specified by:
visit in interface OWLAnnotationVisitor

visit

public void visit(OWLObjectAnnotation annotation)
Specified by:
visit in interface OWLAnnotationVisitor

visit

public void visit(SWRLRule rule)
Specified by:
visit in interface OWLAxiomVisitor
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLClassAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLDataRangeAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLDifferentFromAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLSameAsAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLObjectPropertyAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLDataValuedPropertyAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLBuiltInAtom node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLAtomDVariable node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLAtomIVariable node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLAtomIndividualObject node)
Specified by:
visit in interface SWRLObjectVisitor

visit

public void visit(SWRLAtomConstantObject node)
Specified by:
visit in interface SWRLObjectVisitor

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object