de.fau.cs.www8.jadeowlcodec.tool.dig1_1_extended
Class AbstractDescriptionRenderingVisitor

java.lang.Object
  extended by de.fau.cs.www8.jadeowlcodec.tool.dig1_1_extended.AbstractDescriptionRenderingVisitor
All Implemented Interfaces:
org.semanticweb.owl.model.OWLDescriptionVisitor
Direct Known Subclasses:
ConceptPairRenderingVisitor, ConceptRenderingVisitor, ConceptsRenderingVisitor, InstanceofRenderingVisitor, RoleConceptPairRenderingVisitor

public abstract class AbstractDescriptionRenderingVisitor
extends java.lang.Object
implements org.semanticweb.owl.model.OWLDescriptionVisitor


Field Summary
static org.apache.log4j.Logger logger
          Log4J Logger for this class
 
Constructor Summary
AbstractDescriptionRenderingVisitor(Renderer.SessionInfo session)
           
 
Method Summary
protected  void addAtLeast(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction, org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
           
protected  void addAtLeast(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction, org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
           
protected  void addAtMost(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction, org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
           
protected  void addAtMost(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction, org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
           
abstract  org.kr.dl.dig.v1_1.RoleConceptPair addNewAll()
          Adds a new all.
abstract  org.kr.dl.dig.v1_1.Concepts addNewAnd()
          Adds a new and.
abstract  org.kr.dl.dig.v1_1.NumRoleConceptPair addNewAtleast()
          Adds a new atleast.
abstract  org.kr.dl.dig.v1_1.NumRoleConceptPair addNewAtmost()
          Adds a new atmost.
abstract  org.apache.xmlbeans.XmlObject addNewBottom()
          Adds bottom.
abstract  org.kr.dl.dig.v1_1.Named addNewCatom()
          Adds a new catom.
abstract  org.kr.dl.dig.v1_1.IntequalsDocument.Intequals addNewIntequals()
          Adds a new intequals.
abstract  org.kr.dl.dig.v1_1.Individuals addNewIset()
          Adds a new iset.
abstract  org.kr.dl.dig.v1_1.Concept addNewNot()
          Adds a new not.
abstract  org.kr.dl.dig.v1_1.Concepts addNewOr()
          Adds a new or.
abstract  org.kr.dl.dig.v1_1.RoleConceptPair addNewSome()
          Adds a new some.
abstract  org.kr.dl.dig.v1_1.StringequalsDocument.Stringequals addNewStringequals()
          Adds a new stringequals.
abstract  org.apache.xmlbeans.XmlObject addNewTop()
          Adds top.
 void visit(org.semanticweb.owl.model.OWLAnd owlAnd)
          Adds a new 'and' and populates it using the operands of owlAnd and a corresponding ConceptsRenderingVisitor.
 void visit(org.semanticweb.owl.model.OWLClass owlClass)
          Adds a new 'catom' with name given by owlClass.
 void visit(org.semanticweb.owl.model.OWLDataAllRestriction node)
          Always throws NotExpressableInDIGException.
 void visit(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction)
          Always throws NotExpressableInDIGException.
 void visit(org.semanticweb.owl.model.OWLDataSomeRestriction node)
          Always throws NotExpressableInDIGException.
 void visit(org.semanticweb.owl.model.OWLDataValueRestriction node)
          Always throws NotExpressableInDIGException.
 void visit(org.semanticweb.owl.model.OWLEnumeration enumeration)
          Adds a new 'iset' and populates it using the individuals in enumeration.
 void visit(org.semanticweb.owl.model.OWLFrame node)
          Always throws NotExpressableInDIGException.
 void visit(org.semanticweb.owl.model.OWLNot owlNot)
          Adds a new 'not' and populates it using the operand of owlNot and a corresponding ConceptRenderingVisitor.
 void visit(org.semanticweb.owl.model.OWLObjectAllRestriction restriction)
          Adds a new 'all' and populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.
 void visit(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction)
          Depending on whether restriction is 'atmost', 'atleast', or 'exactly' it either adds a new 'atmost', or a new 'atleast', or a conjunction of the two and then populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.
 void visit(org.semanticweb.owl.model.OWLObjectSomeRestriction restriction)
          Adds a new 'some' and populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.
 void visit(org.semanticweb.owl.model.OWLObjectValueRestriction restriction)
          Renders OWL's hasValue as DIG's some restriction.getObjectProperty() iset restriction.getIndividual()
 void visit(org.semanticweb.owl.model.OWLOr owlOr)
          Adds a new 'or' and populates it using the operands of owlOr and a corresponding ConceptsRenderingVisitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.apache.log4j.Logger logger
Log4J Logger for this class

Constructor Detail

AbstractDescriptionRenderingVisitor

public AbstractDescriptionRenderingVisitor(Renderer.SessionInfo session)
Method Detail

visit

public void visit(org.semanticweb.owl.model.OWLClass owlClass)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'catom' with name given by owlClass.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
owlClass - an OWLClass.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLAnd owlAnd)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'and' and populates it using the operands of owlAnd and a corresponding ConceptsRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
owlAnd - OWLAnd.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLOr owlOr)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'or' and populates it using the operands of owlOr and a corresponding ConceptsRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
owlOr - OWLOr.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLNot owlNot)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'not' and populates it using the operand of owlNot and a corresponding ConceptRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
owlNot - OWLNot.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLEnumeration enumeration)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'iset' and populates it using the individuals in enumeration.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
enumeration - OWLEnumeration.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLObjectSomeRestriction restriction)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'some' and populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
restriction - OWLObjectSomeRestriction.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLObjectAllRestriction restriction)
           throws org.semanticweb.owl.model.OWLException
Adds a new 'all' and populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
restriction - OWLObjectAllRestriction.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLObjectValueRestriction restriction)
           throws org.semanticweb.owl.model.OWLException
Renders OWL's hasValue as DIG's some restriction.getObjectProperty() iset restriction.getIndividual()

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
restriction - OWLObjectValueRestriction.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction)
           throws org.semanticweb.owl.model.OWLException
Depending on whether restriction is 'atmost', 'atleast', or 'exactly' it either adds a new 'atmost', or a new 'atleast', or a conjunction of the two and then populates it using restriction and a corresponding RoleConceptPairRenderingVisitor.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Parameters:
restriction - OWLObjectCardinalityRestriction.
Throws:
OWLException.
org.semanticweb.owl.model.OWLException

addAtLeast

protected void addAtLeast(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction,
                          org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
                   throws org.semanticweb.owl.model.OWLException
Parameters:
restriction -
numRoleConceptPair -
Throws:
org.semanticweb.owl.model.OWLException

addAtMost

protected void addAtMost(org.semanticweb.owl.model.OWLObjectCardinalityRestriction restriction,
                         org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
                  throws org.semanticweb.owl.model.OWLException
Parameters:
restriction -
numRoleConceptPair -
Throws:
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction)
           throws org.semanticweb.owl.model.OWLException
Always throws NotExpressableInDIGException. The problem here is that there isn't really an expression in DIG that corresponds to a data cardinality restriction. Ideally we want DIG to allow unqualified cardinality restrictions.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Throws:
NotExpressableInDIGException - always unless the DIG extensions atleastattribute or atmostattribute are set.
org.semanticweb.owl.model.OWLException

addAtMost

protected void addAtMost(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction,
                         org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
                  throws org.semanticweb.owl.model.OWLException
Parameters:
restriction -
numRoleConceptPair -
Throws:
org.semanticweb.owl.model.OWLException

addAtLeast

protected void addAtLeast(org.semanticweb.owl.model.OWLDataCardinalityRestriction restriction,
                          org.kr.dl.dig.v1_1.NumRoleConceptPair numRoleConceptPair)
                   throws org.semanticweb.owl.model.OWLException
Parameters:
restriction -
numRoleConceptPair -
Throws:
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLDataAllRestriction node)
           throws NotExpressableInDIGException,
                  org.semanticweb.owl.model.OWLException
Always throws NotExpressableInDIGException. The problem here is that there isn't really an expression in DIG that corresponds to a data all restriction. In some cases we could translate to a local range but it would be rather unpleasant bespoke code. Instead, we choose to throw an exception here.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Throws:
NotExpressableInDIGException - always.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLDataSomeRestriction node)
           throws NotExpressableInDIGException,
                  org.semanticweb.owl.model.OWLException
Always throws NotExpressableInDIGException. The problem here is that there isn't really an expression in DIG that corresponds to a data some restriction. In some cases we could translate to a local range but it would be rather unpleasant bespoke code. Instead, we choose to throw an exception here.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Throws:
NotExpressableInDIGException - always.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLDataValueRestriction node)
           throws NotExpressableInDIGException,
                  org.semanticweb.owl.model.OWLException
Always throws NotExpressableInDIGException.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Throws:
NotExpressableInDIGException - always.
org.semanticweb.owl.model.OWLException

visit

public void visit(org.semanticweb.owl.model.OWLFrame node)
           throws NotExpressableInDIGException
Always throws NotExpressableInDIGException.

Specified by:
visit in interface org.semanticweb.owl.model.OWLDescriptionVisitor
Throws:
NotExpressableInDIGException - always.

addNewTop

public abstract org.apache.xmlbeans.XmlObject addNewTop()
Adds top.

Returns:
the XmlObject corresponding to top.

addNewBottom

public abstract org.apache.xmlbeans.XmlObject addNewBottom()
Adds bottom.

Returns:
the XmlObject corresponding to bottom.

addNewCatom

public abstract org.kr.dl.dig.v1_1.Named addNewCatom()
Adds a new catom.

Returns:
the Namedresulting from adding a new catom.

addNewAnd

public abstract org.kr.dl.dig.v1_1.Concepts addNewAnd()
Adds a new and.

Returns:
the Conceptsresulting from adding a new and.

addNewOr

public abstract org.kr.dl.dig.v1_1.Concepts addNewOr()
Adds a new or.

Returns:
the Conceptsresulting from adding a new or.

addNewNot

public abstract org.kr.dl.dig.v1_1.Concept addNewNot()
Adds a new not.

Returns:
the Conceptresulting from adding a new not.

addNewIset

public abstract org.kr.dl.dig.v1_1.Individuals addNewIset()
Adds a new iset.

Returns:
the Individualsresulting from adding a new iset.

addNewSome

public abstract org.kr.dl.dig.v1_1.RoleConceptPair addNewSome()
Adds a new some.

Returns:
the RoleConceptPairresulting from adding a new some.

addNewAll

public abstract org.kr.dl.dig.v1_1.RoleConceptPair addNewAll()
Adds a new all.

Returns:
the RoleConceptPairresulting from adding a new all.

addNewAtmost

public abstract org.kr.dl.dig.v1_1.NumRoleConceptPair addNewAtmost()
Adds a new atmost.

Returns:
the NumRoleConceptPairresulting from adding a new atmost.

addNewAtleast

public abstract org.kr.dl.dig.v1_1.NumRoleConceptPair addNewAtleast()
Adds a new atleast.

Returns:
the NumRoleConceptPairresulting from adding a new atleast.

addNewStringequals

public abstract org.kr.dl.dig.v1_1.StringequalsDocument.Stringequals addNewStringequals()
Adds a new stringequals.

Returns:
the (see link in source code; it doesnt work in extern references for javadoc)resulting from adding a new stringequals.

addNewIntequals

public abstract org.kr.dl.dig.v1_1.IntequalsDocument.Intequals addNewIntequals()
Adds a new intequals.

Returns:
the (see link in source code; it doesnt work in extern references for javadoc) resulting from adding a new intequals.


Copyright 2007 Moritz Goeb, Bernhard Schiemann, Ulf Schreiber of Chair of Artificial Intelligence, University of Erlangen-Nuremberg