Class SourceDocumentInformation

  • All Implemented Interfaces:
    java.lang.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
    • Field Detail

      • typeIndexID

        public static final int typeIndexID
      • type

        public static final int type
      • _FeatName_offsetInSource

        public static final java.lang.String _FeatName_offsetInSource
        See Also:
        Constant Field Values
      • _FeatName_documentSize

        public static final java.lang.String _FeatName_documentSize
        See Also:
        Constant Field Values
      • _FeatName_lastSegment

        public static final java.lang.String _FeatName_lastSegment
        See Also:
        Constant Field Values
      • _FC_uri

        private static final java.lang.invoke.CallSite _FC_uri
      • _FH_uri

        private static final java.lang.invoke.MethodHandle _FH_uri
      • _FC_offsetInSource

        private static final java.lang.invoke.CallSite _FC_offsetInSource
      • _FH_offsetInSource

        private static final java.lang.invoke.MethodHandle _FH_offsetInSource
      • _FC_documentSize

        private static final java.lang.invoke.CallSite _FC_documentSize
      • _FH_documentSize

        private static final java.lang.invoke.MethodHandle _FH_documentSize
      • _FC_lastSegment

        private static final java.lang.invoke.CallSite _FC_lastSegment
      • _FH_lastSegment

        private static final java.lang.invoke.MethodHandle _FH_lastSegment
    • 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
      • readObject

        private void readObject()
        Write your own initialization here
      • getUri

        public java.lang.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​(java.lang.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