Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.semanticweb.owlapi.owllink.parser
Class MyOWLXMLParserHandler

    java.lang.Object
      OWLXMLParserHandler
          org.semanticweb.owlapi.owllink.parser.MyOWLXMLParserHandler

Direct Known Subclasses:
  OWLlinkXMLParserHandler, OWLlinkXMLRequestParserHandler

    public class MyOWLXMLParserHandler

extends OWLXMLParserHandler

SWR*Handler: protected class constructor OWLLiteralElementHandler : protected class constructor

This OWLXMLParserHandler is based on Matthew Horridge's implementation.

Field Summary
`protected java.util.Map<java.lang.String,OWLElementHandlerFactory>` | `handlerMap`
`protected java.util.List<OWLElementHandler>` | `handlerStack`
`protected java.util.Map<java.lang.String,java.lang.String>` | `prefixName2PrefixMap`

Constructor Summary
`MyOWLXMLParserHandler(OWLOntologyManager owlOntologyManager, OWLOntology ontology)` Creates an OWLXML handler.
`MyOWLXMLParserHandler(OWLOntologyManager owlOntologyManager, OWLOntology ontology, OWLElementHandler topHandler)` Creates an OWLXML handler with the specified top level handler.

Method Summary
`void` | `characters(char[] ch, int start, int length)`
`void` | `endDocument()`
`void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)`
`IRI` | `getAbbreviatedIRI(java.lang.String abbreviatedIRI)`
`java.net.URI` | `getBase()` Return the base URI for resolution of relative URIs
`OWLDataFactory` | `getDataFactory()`
`IRI` | `getIRI(java.lang.String iriStr)`
`int` | `getLineNumber()` Gets the line number that the parser is at.
`OWLOntology` | `getOntology()`
`OWLOntologyManager` | `getOWLOntologyManager()`
`java.util.Map<java.lang.String,java.lang.String>` | `getPrefixName2PrefixMap()`
`protected void` | `processXMLBase(org.xml.sax.Attributes attributes)`
`org.xml.sax.InputSource` | `resolveEntity(java.lang.String publicId, java.lang.String systemId)`
`void` | `setDocumentLocator(org.xml.sax.Locator locator)`
`void` | `setPrefixName2PrefixMap(java.util.Map<java.lang.String,java.lang.String> map)`
`void` | `startDocument()`
`void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)`
`void` | `startPrefixMapping(java.lang.String prefix, java.lang.String uri)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### handlerStack

    protected java.util.List<OWLElementHandler> handlerStack

### handlerMap

    protected java.util.Map<java.lang.String,OWLElementHandlerFactory> handlerMap

### prefixName2PrefixMap

    protected java.util.Map<java.lang.String,java.lang.String> prefixName2PrefixMap

Constructor Detail

### MyOWLXMLParserHandler

    public MyOWLXMLParserHandler(OWLOntologyManager owlOntologyManager,
                                 OWLOntology ontology)

  Creates an OWLXML handler.

  Parameters:
    `owlOntologyManager` - The manager that should be used to obtain a data factory, imported ontologies etc.
    `ontology` - The ontology that the XML representation will be parsed into.

### MyOWLXMLParserHandler

    public MyOWLXMLParserHandler(OWLOntologyManager owlOntologyManager,
                                 OWLOntology ontology,
                                 OWLElementHandler topHandler)

  Creates an OWLXML handler with the specified top level handler. This allows OWL/XML representations of axioms to be embedded in abitrary XML documents e.g. DIG 2.0 documents. (The default handler behaviour expects the top level element to be an Ontology element).

  Parameters:
    `owlOntologyManager` - The manager that should be used to obtain a data factory, imported ontologies etc.
    `ontology` - The ontology object that the XML representation should be parsed into.
    `topHandler` - The handler for top level elements - may be `null`, in which case the parser will expect an Ontology element to be the root element.

Method Detail

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator locator)

### getLineNumber

    public int getLineNumber()

  Gets the line number that the parser is at.

  Returns:
    A positive integer that represents the line number or -1 if the line number is not known.

### getIRI

    public IRI getIRI(java.lang.String iriStr)
               throws OWLXMLParserException

  Throws:
    `OWLXMLParserException`

### getAbbreviatedIRI

    public IRI getAbbreviatedIRI(java.lang.String abbreviatedIRI)
                          throws OWLXMLParserException

  Throws:
    `OWLXMLParserException`

### getPrefixName2PrefixMap

    public java.util.Map<java.lang.String,java.lang.String> getPrefixName2PrefixMap()

### setPrefixName2PrefixMap

    public void setPrefixName2PrefixMap(java.util.Map<java.lang.String,java.lang.String> map)

### getOntology

    public OWLOntology getOntology()

### getDataFactory

    public OWLDataFactory getDataFactory()

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String qName,
                             org.xml.sax.Attributes attributes)
                      throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### processXMLBase

    protected void processXMLBase(org.xml.sax.Attributes attributes)

### getBase

    public java.net.URI getBase()

  Return the base URI for resolution of relative URIs

  Returns:
    base URI or null if unavailable (xml:base not present and the document locator does not provide a URI)

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String qName)
                    throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### startPrefixMapping

    public void startPrefixMapping(java.lang.String prefix,
                                   java.lang.String uri)
                            throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### resolveEntity

    public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                                 java.lang.String systemId)
                                          throws java.io.IOException,
                                                 org.xml.sax.SAXException

  Throws:
    `java.io.IOException`
    `org.xml.sax.SAXException`

### getOWLOntologyManager

    public OWLOntologyManager getOWLOntologyManager()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD