org.apache.uima.examples

## Class SourceDocumentInformation

- java.lang.Object
- - org.apache.uima.cas.impl.FeatureStructureImplC
  - - org.apache.uima.jcas.cas.TOP
    - - org.apache.uima.jcas.cas.AnnotationBase
      - - org.apache.uima.jcas.tcas.Annotation
        - - org.apache.uima.examples.SourceDocumentInformation

- All Implemented Interfaces:
    Cloneable, AnnotationBaseFS, FeatureStructure, AnnotationBaseImpl, AnnotationImpl, FeatureStructureImpl, AnnotationFS

      public class SourceDocumentInformation
      extends Annotation

  Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries. Updated by JCasGen Sun Oct 08 19:24:05 EDT 2017 XML source: C:/au/svnCheckouts/uv3/trunk/uimaj-v3/uimaj-examples/src/main/resources/org/apache/uima/examples/SourceDocumentInformation.xml

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.uima.cas.impl.FeatureStructureImplC

      `FeatureStructureImplC.PrintReferences`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `_FeatName_documentSize`
    `static String` | `_FeatName_lastSegment`
    `static String` | `_FeatName_offsetInSource`
    `static String` | `_FeatName_uri`
    `static String` | `_TypeName`
    `static int` | `type`
    `static int` | `typeIndexID`

    - ### Fields inherited from class org.apache.uima.jcas.tcas.Annotation

      `_FeatName_begin, _FeatName_end`

    - ### Fields inherited from class org.apache.uima.jcas.cas.AnnotationBase

      `_FeatName_sofa`

    - ### Fields inherited from class org.apache.uima.jcas.cas.TOP

      `_singleton`

    - ### Fields inherited from class org.apache.uima.cas.impl.FeatureStructureImplC

      `_casView, _id, DISABLE_RUNTIME_FEATURE_VALIDATION, DISABLE_RUNTIME_FEATURE_VALUE_VALIDATION, IS_ENABLE_RUNTIME_FEATURE_VALIDATION, IS_ENABLE_RUNTIME_FEATURE_VALUE_VALIDATION, IS_V2_PRETTY_PRINT, V2_PRETTY_PRINT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SourceDocumentInformation()` Never called.
    `` | `SourceDocumentInformation(JCas jcas)`
    `` | `SourceDocumentInformation(JCas jcas, int begin, int end)`
    `` | `SourceDocumentInformation(TypeImpl type, CASImpl casImpl)` Internal - constructor used by generator

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDocumentSize()` getter for documentSize - gets Size of original document in bytes before processing by CAS Initializer.
    `boolean` | `getLastSegment()` getter for lastSegment - gets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.
    `int` | `getOffsetInSource()` getter for offsetInSource - gets Byte offset of the start of document content within original source file or other input source.
    `int` | `getTypeIndexID()`
    `String` | `getUri()` getter for uri - gets URI of document.
    `void` | `setDocumentSize(int v)` setter for documentSize - sets Size of original document in bytes before processing by CAS Initializer.
    `void` | `setLastSegment(boolean v)` setter for lastSegment - sets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.
    `void` | `setOffsetInSource(int v)` setter for offsetInSource - sets Byte offset of the start of document content within original source file or other input source.
    `void` | `setUri(String v)` setter for uri - sets URI of document.

    - ### Methods inherited from class org.apache.uima.jcas.tcas.Annotation

      `compareAnnotation, compareAnnotation, compareAnnotationWithId, compareAnnotationWithId, getBegin, getCoveredText, getEnd, getStart, setBegin, setEnd, trim`

    - ### Methods inherited from class org.apache.uima.jcas.cas.AnnotationBase

      `getSofa, getView, setFeatureValue`

    - ### Methods inherited from class org.apache.uima.jcas.cas.TOP

      `_createJCasHashMapReserve, _createSearchKey`

    - ### Methods inherited from class org.apache.uima.cas.impl.FeatureStructureImplC

      `_copyIntAndRefArraysEqTypesFrom, _copyIntAndRefArraysFrom, _copyIntArrayEqTypesFrom, _getBooleanValueNc, _getBooleanValueNc, _getByteValueNc, _getByteValueNc, _getDoubleValueNc, _getDoubleValueNc, _getFeatFromAdjOffset, _getFeatureValueNc, _getFeatureValueNc, _getFloatValueNc, _getFloatValueNc, _getIntLikeValue, _getIntValueNc, _getIntValueNc, _getLongValueNc, _getLongValueNc, _getRefValueCommon, _getShortValueNc, _getShortValueNc, _getStringValueNc, _getStringValueNc, _getTypeCode, _getTypeImpl, _getView, _id, _inSetSortedIndex, _isJCasHashMapReserve, _isPearTrampoline, _maybeGetBaseForPearFs, _maybeGetBaseForPearFs, _maybeGetPearFs, _maybeGetPearFs, _resetInSetSortedIndex, _setBooleanValueNcNj, _setBooleanValueNcNj, _setBooleanValueNfc, _setByteValueNcNj, _setByteValueNcNj, _setByteValueNfc, _setDoubleValueNcNj, _setDoubleValueNcNj, _setDoubleValueNfc, _setFeatureValueNcNj, _setFeatureValueNcNj, _setFeatureValueNcWj, _setFloatValueNcNj, _setFloatValueNcNj, _setFloatValueNfc, _setInSetSortedIndexed, _setIntLikeValue, _setIntLikeValueNcNj, _setIntValueCJ, _setIntValueNcNj, _setIntValueNcNj, _setIntValueNfc, _setIntValueNfcCJ, _setJCasHashMapReserve, _setLongValueCJ, _setLongValueNcNj, _setLongValueNcNj, _setLongValueNfc, _setLongValueNfcCJ, _setPearTrampoline, _setRefValueCJ, _setRefValueCommon, _setRefValueCommonWj, _setRefValueNfcCJ, _setShortValueNcNj, _setShortValueNcNj, _setShortValueNfc, _setStringValueNcNj, _setStringValueNcWj, _setStringValueNfc, _setTypeImpl, addStringOrPrimitive, addToIndexes, addToIndexes, addToIndexes, clone, compare, equals, getAddress, getBooleanValue, getByteValue, getCAS, getCASImpl, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getLowLevelCas, getShortValue, getStringValue, getType, hashCode, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrintShort, removeFromIndexes, removeFromIndexes, removeFromIndexes, setBooleanValue, setByteValue, setDoubleValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toShortString, toString, toString, wrapGetIntCatchException`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.uima.cas.text.AnnotationFS

      `coveredBy, coveredBy, covering, covering, following, following, overlapping, overlapping, overlappingAtBegin, overlappingAtBegin, overlappingAtEnd, overlappingAtEnd, preceding, preceding, trim`

    - ### Methods inherited from interface org.apache.uima.cas.AnnotationBaseFS

      `getView`

    - ### Methods inherited from interface org.apache.uima.cas.FeatureStructure

      `_getTypeCode, _id, clone, equals, getAddress, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getJCas, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue`

    - ### Methods inherited from interface org.apache.uima.cas.impl.FeatureStructureImpl

      `prettyPrint, prettyPrint, prettyPrint, prettyPrint, toString`

- - ### Field Detail

    - #### _TypeName

          public static final String _TypeName

      See Also:
        Constant Field Values

    - #### typeIndexID

          public static final int typeIndexID

    - #### type

          public static final int type

    - #### _FeatName_uri

          public static final String _FeatName_uri

      See Also:
        Constant Field Values

    - #### _FeatName_offsetInSource

          public static final String _FeatName_offsetInSource

      See Also:
        Constant Field Values

    - #### _FeatName_documentSize

          public static final String _FeatName_documentSize

      See Also:
        Constant Field Values

    - #### _FeatName_lastSegment

          public static final String _FeatName_lastSegment

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SourceDocumentInformation

          protected SourceDocumentInformation()

      Never called. Disable default constructor

    - #### SourceDocumentInformation

          public SourceDocumentInformation(TypeImpl type,
                                           CASImpl casImpl)

      Internal - constructor used by generator
      Parameters:
        `casImpl` - the CAS this Feature Structure belongs to
        `type` - the type of this Feature Structure

    - #### SourceDocumentInformation

          public SourceDocumentInformation(JCas jcas)

      Parameters:
        `jcas` - JCas to which this Feature Structure belongs

    - #### SourceDocumentInformation

          public SourceDocumentInformation(JCas jcas,
                                           int begin,
                                           int end)

      Parameters:
        `jcas` - JCas to which this Feature Structure belongs
        `begin` - offset to the begin spot in the SofA
        `end` - offset to the end spot in the SofA

  - ### Method Detail

    - #### getTypeIndexID

          public int getTypeIndexID()

      Overrides:
        `getTypeIndexID` in class `Annotation`
      Returns:
        index of the type

    - #### getUri

          public String getUri()

      getter for uri - gets URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)
      Returns:
        value of the feature

    - #### setUri

          public void setUri(String v)

      setter for uri - sets URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)
      Parameters:
        `v` - value to set into the feature

    - #### getOffsetInSource

          public int getOffsetInSource()

      getter for offsetInSource - gets Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.
      Returns:
        value of the feature

    - #### setOffsetInSource

          public void setOffsetInSource(int v)

      setter for offsetInSource - sets Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.
      Parameters:
        `v` - value to set into the feature

    - #### getDocumentSize

          public int getDocumentSize()

      getter for documentSize - gets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.
      Returns:
        value of the feature

    - #### setDocumentSize

          public void setDocumentSize(int v)

      setter for documentSize - sets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.
      Parameters:
        `v` - value to set into the feature

    - #### getLastSegment

          public boolean getLastSegment()

      getter for lastSegment - gets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document. This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document.
      Returns:
        value of the feature

    - #### setLastSegment

          public void setLastSegment(boolean v)

      setter for lastSegment - sets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document. This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document.
      Parameters:
        `v` - value to set into the feature

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