org.apache.uima.cas_data.impl

## Class CasDataToXCas

- java.lang.Object
- - org.apache.uima.cas_data.impl.CasDataToXCas

-     public class CasDataToXCas
      extends Object

  Takes a CasData and generates XCAS SAX events.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CasDataToXCas()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generateXCas(CasData aCasData)` Generates XCAS for a CasData.
    `void` | `generateXCas(CasData aCasData, String aUEID)` Special form of `generateXCas(CasData)` that allows a UEID (Universal Entity ID) element to be added as the first element in the XCAS.
    `void` | `generateXCas(CasData aCasData, String aUEID, boolean aSendStartAndEndDocEvents)` Special form of `generateXCas(CasData)` that allows a UEID (Universal Entity ID) element to be added as the first element in the XCAS and also allows start/end document SAX calls to be supressed.
    `String` | `getDocumentTextFeatureName()` Gets the name of the CASData Feature that stores the document text.
    `String` | `getDocumentTextTypeName()` Gets the name of the CASData FeatureStructure Type that stores the document text.
    `void` | `setContentHandler(ContentHandler aHandler)` Sets the ContentHandler to receive the SAX events.
    `void` | `setDocumentTextFeatureName(String aDocumentTextFeatureName)` Sets the name of the CASData Feature that stores the document text.
    `void` | `setDocumentTextTypeName(String aDocumentTextTypeName)` Sets the name of the CASData FeatureStructure Type that stores the document text.
    `void` | `setIncludeAnnotationSpannedText(boolean aIncludeAnnotationSpannedText)`
    `void` | `setTypesToFilter(String[] aTypesToFilter)` Specifies names of types that will not be included in the XCAS
    `void` | `setXCasDocumentTextTagName(String aXCasDocTextTag)` Sets the name of the XCAS tag that will contain the document text.

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

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

- - ### Constructor Detail

    - #### CasDataToXCas

          public CasDataToXCas()

  - ### Method Detail

    - #### getDocumentTextTypeName

          public String getDocumentTextTypeName()

      Gets the name of the CASData FeatureStructure Type that stores the document text.
      Returns:
        the document text type name

    - #### setDocumentTextTypeName

          public void setDocumentTextTypeName(String aDocumentTextTypeName)

      Sets the name of the CASData FeatureStructure Type that stores the document text.
      Parameters:
        `aDocumentTextTypeName` - the document text type name

    - #### getDocumentTextFeatureName

          public String getDocumentTextFeatureName()

      Gets the name of the CASData Feature that stores the document text.
      Returns:
        the document text feature name

    - #### setDocumentTextFeatureName

          public void setDocumentTextFeatureName(String aDocumentTextFeatureName)

      Sets the name of the CASData Feature that stores the document text.
      Parameters:
        `aDocumentTextFeatureName` - the document text feature name

    - #### setXCasDocumentTextTagName

          public void setXCasDocumentTextTagName(String aXCasDocTextTag)

      Sets the name of the XCAS tag that will contain the document text.
      Parameters:
        `aXCasDocTextTag` - the document text tag

    - #### setIncludeAnnotationSpannedText

          public void setIncludeAnnotationSpannedText(boolean aIncludeAnnotationSpannedText)

      Parameters:
        `aIncludeAnnotationSpannedText` - -

    - #### setTypesToFilter

          public void setTypesToFilter(String[] aTypesToFilter)

      Specifies names of types that will not be included in the XCAS
      Parameters:
        `aTypesToFilter` - -

    - #### setContentHandler

          public void setContentHandler(ContentHandler aHandler)

      Sets the ContentHandler to receive the SAX events.
      Parameters:
        `aHandler` - -

    - #### generateXCas

          public void generateXCas(CasData aCasData)
                            throws SAXException

      Generates XCAS for a CasData. SAX events representing the XCAS will be sent to the ContentHandler registered via `setContentHandler(ContentHandler)`.
      Parameters:
        `aCasData` - the CasData from which XCAS will be generated
      Throws:
        `SAXException` - if the ContentHandler throws a SAX Exception

    - #### generateXCas

          public void generateXCas(CasData aCasData,
                                   String aUEID)
                            throws SAXException

      Special form of `generateXCas(CasData)` that allows a UEID (Universal Entity ID) element to be added as the first element in the XCAS.
      Parameters:
        `aCasData` - the CasData from which XCAS will be generated
        `aUEID` - the UEID to add to the XCAS
      Throws:
        `SAXException` - if the ContentHandler throws a SAX Exception

    - #### generateXCas

          public void generateXCas(CasData aCasData,
                                   String aUEID,
                                   boolean aSendStartAndEndDocEvents)
                            throws SAXException

      Special form of `generateXCas(CasData)` that allows a UEID (Universal Entity ID) element to be added as the first element in the XCAS and also allows start/end document SAX calls to be supressed.
      Parameters:
        `aCasData` - the CasData from which XCAS will be generated
        `aUEID` - the UEID to add to the XCAS
        `aSendStartAndEndDocEvents` - true to send SAX events for start and end of document, false to supress them.
      Throws:
        `SAXException` - if the ContentHandler throws a SAX Exception

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