org.apache.uima.cas_data.impl

## Class XCasToCasDataSaxHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler

- All Implemented Interfaces:
    ContentHandler, DTDHandler, EntityResolver, ErrorHandler

      public class XCasToCasDataSaxHandler
      extends DefaultHandler

  A SAX ContentHandler that reads XCAS and creates a CasData.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XCasToCasDataSaxHandler(CasData aCasData)` Create new XCasToCasDataSaxHandler.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] chars, int start, int length)`
    `void` | `endDocument()`
    `void` | `endElement(String nsURI, String localName, String qualifiedName)`
    `void` | `error(SAXParseException e)`
    `void` | `fatalError(SAXParseException e)`
    `void` | `ignorableWhitespace(char[] arg0, int arg1, int arg2)`
    `void` | `setDocumentLocator(Locator loc)`
    `void` | `startDocument()`
    `void` | `startElement(String nameSpaceURI, String localName, String qualifiedName, Attributes attrs)`
    `void` | `warning(SAXParseException e)`

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endPrefixMapping, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XCasToCasDataSaxHandler

          public XCasToCasDataSaxHandler(CasData aCasData)

      Create new XCasToCasDataSaxHandler.
      Parameters:
        `aCasData` - the CasData to which FeatureStructures parsed from XCAS will be appended

  - ### Method Detail

    - #### startDocument

          public void startDocument()
                             throws SAXException

      Specified by:
        `startDocument` in interface `ContentHandler`
      Overrides:
        `startDocument` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### startElement

          public void startElement(String nameSpaceURI,
                                   String localName,
                                   String qualifiedName,
                                   Attributes attrs)
                            throws SAXException

      Specified by:
        `startElement` in interface `ContentHandler`
      Overrides:
        `startElement` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### characters

          public void characters(char[] chars,
                                 int start,
                                 int length)
                          throws SAXException

      Specified by:
        `characters` in interface `ContentHandler`
      Overrides:
        `characters` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### endElement

          public void endElement(String nsURI,
                                 String localName,
                                 String qualifiedName)
                          throws SAXException

      Specified by:
        `endElement` in interface `ContentHandler`
      Overrides:
        `endElement` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### endDocument

          public void endDocument()
                           throws SAXException

      Specified by:
        `endDocument` in interface `ContentHandler`
      Overrides:
        `endDocument` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### error

          public void error(SAXParseException e)
                     throws SAXException

      Specified by:
        `error` in interface `ErrorHandler`
      Overrides:
        `error` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### fatalError

          public void fatalError(SAXParseException e)
                          throws SAXException

      Specified by:
        `fatalError` in interface `ErrorHandler`
      Overrides:
        `fatalError` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### ignorableWhitespace

          public void ignorableWhitespace(char[] arg0,
                                          int arg1,
                                          int arg2)
                                   throws SAXException

      Specified by:
        `ignorableWhitespace` in interface `ContentHandler`
      Overrides:
        `ignorableWhitespace` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### setDocumentLocator

          public void setDocumentLocator(Locator loc)

      Specified by:
        `setDocumentLocator` in interface `ContentHandler`
      Overrides:
        `setDocumentLocator` in class `DefaultHandler`

    - #### warning

          public void warning(SAXParseException e)
                       throws SAXException

      Specified by:
        `warning` in interface `ErrorHandler`
      Overrides:
        `warning` in class `DefaultHandler`
      Throws:
        `SAXException`

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.