org.coode.owlapi.owlxmlparser
Class AbstractOWLElementHandler<O>

java.lang.Object
  extended by org.coode.owlapi.owlxmlparser.AbstractOWLElementHandler<O>
All Implemented Interfaces:
OWLElementHandler<O>
Direct Known Subclasses:
AbstractClassExpressionElementHandler, AbstractIRIElementHandler, AbstractOWLAxiomElementHandler, AbstractOWLDataRangeHandler, AbstractOWLObjectPropertyElementHandler, OWLAnnotationElementHandler, OWLAnnotationPropertyElementHandler, OWLAnonymousIndividualElementHandler, OWLDataPropertyElementHandler, OWLDatatypeFacetRestrictionElementHandler, OWLImportsHandler, OWLIndividualElementHandler, OWLLiteralElementHandler, OWLOntologyHandler, OWLSubObjectPropertyChainElementHandler, OWLUnionOfElementHandler, SWRLAtomElementHandler, SWRLAtomListElementHandler, SWRLVariableElementHandler

public abstract class AbstractOWLElementHandler<O>
extends java.lang.Object
implements OWLElementHandler<O>

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 13-Dec-2006


Constructor Summary
protected AbstractOWLElementHandler(OWLXMLParserHandler handler)
           
 
Method Summary
 void attribute(java.lang.String localName, java.lang.String value)
           
protected  IRI getAbbreviatedIRI(java.lang.String abbreviatedIRI)
           
protected  int getColumnNumber()
           
protected  java.lang.String getElementName()
           
protected  IRI getIRI(java.lang.String iri)
           
 IRI getIRIFromAttribute(java.lang.String localName, java.lang.String value)
           
 IRI getIRIFromElement(java.lang.String elementLocalName, java.lang.String textContent)
           
protected  int getLineNumber()
           
protected  OWLOntology getOntology()
           
protected  OWLDataFactory getOWLDataFactory()
           
protected  OWLOntologyManager getOWLOntologyManager()
           
protected  OWLElementHandler getParentHandler()
           
 java.lang.String getText()
           
 void handleChars(char[] chars, int start, int length)
           
 void handleChild(AbstractClassExpressionElementHandler handler)
           
 void handleChild(AbstractIRIElementHandler handler)
           
 void handleChild(AbstractOWLAxiomElementHandler handler)
           
 void handleChild(AbstractOWLDataRangeHandler handler)
           
 void handleChild(AbstractOWLObjectPropertyElementHandler handler)
           
 void handleChild(OWLAnnotationElementHandler handler)
           
 void handleChild(OWLAnnotationPropertyElementHandler handler)
           
 void handleChild(OWLAnonymousIndividualElementHandler handler)
           
 void handleChild(OWLDataPropertyElementHandler handler)
           
 void handleChild(OWLDatatypeFacetRestrictionElementHandler handler)
           
 void handleChild(OWLIndividualElementHandler handler)
           
 void handleChild(OWLLiteralElementHandler handler)
           
 void handleChild(OWLSubObjectPropertyChainElementHandler handler)
           
 void handleChild(SWRLAtomElementHandler handler)
           
 void handleChild(SWRLAtomListElementHandler handler)
           
 void handleChild(SWRLVariableElementHandler handler)
           
 boolean isTextContentPossible()
           
 void setParentHandler(OWLElementHandler handler)
           
 void startElement(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.coode.owlapi.owlxmlparser.OWLElementHandler
endElement, getOWLObject
 

Constructor Detail

AbstractOWLElementHandler

protected AbstractOWLElementHandler(OWLXMLParserHandler handler)
Method Detail

getIRIFromAttribute

public IRI getIRIFromAttribute(java.lang.String localName,
                               java.lang.String value)
                        throws OWLParserException
Throws:
OWLParserException

getIRIFromElement

public IRI getIRIFromElement(java.lang.String elementLocalName,
                             java.lang.String textContent)
                      throws OWLParserException
Throws:
OWLParserException

getOWLOntologyManager

protected OWLOntologyManager getOWLOntologyManager()
                                            throws OWLXMLParserException
Throws:
OWLXMLParserException

getOntology

protected OWLOntology getOntology()

getOWLDataFactory

protected OWLDataFactory getOWLDataFactory()

setParentHandler

public void setParentHandler(OWLElementHandler handler)
Specified by:
setParentHandler in interface OWLElementHandler<O>

getParentHandler

protected OWLElementHandler getParentHandler()

attribute

public void attribute(java.lang.String localName,
                      java.lang.String value)
               throws OWLParserException
Specified by:
attribute in interface OWLElementHandler<O>
Throws:
OWLParserException

getIRI

protected IRI getIRI(java.lang.String iri)
              throws OWLParserException
Throws:
OWLParserException

getAbbreviatedIRI

protected IRI getAbbreviatedIRI(java.lang.String abbreviatedIRI)
                         throws OWLParserException
Throws:
OWLParserException

getLineNumber

protected int getLineNumber()

getColumnNumber

protected int getColumnNumber()

startElement

public void startElement(java.lang.String name)
                  throws OWLXMLParserException
Specified by:
startElement in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

getElementName

protected java.lang.String getElementName()
                                   throws OWLXMLParserException
Throws:
OWLXMLParserException

handleChild

public void handleChild(AbstractOWLAxiomElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(AbstractClassExpressionElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(AbstractOWLDataRangeHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(AbstractOWLObjectPropertyElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLDataPropertyElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLIndividualElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLLiteralElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLAnnotationElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLSubObjectPropertyChainElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLDatatypeFacetRestrictionElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLAnnotationPropertyElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(OWLAnonymousIndividualElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(AbstractIRIElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(SWRLVariableElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(SWRLAtomElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChild

public void handleChild(SWRLAtomListElementHandler handler)
                 throws OWLXMLParserException
Specified by:
handleChild in interface OWLElementHandler<O>
Throws:
OWLXMLParserException

handleChars

public final void handleChars(char[] chars,
                              int start,
                              int length)
Specified by:
handleChars in interface OWLElementHandler<O>

getText

public java.lang.String getText()
Specified by:
getText in interface OWLElementHandler<O>

isTextContentPossible

public boolean isTextContentPossible()
Specified by:
isTextContentPossible in interface OWLElementHandler<O>