org.apache.uima.examples
Class SourceDocumentInformation

java.lang.Object
  extended by org.apache.uima.cas.impl.FeatureStructureImpl
      extended by org.apache.uima.jcas.cas.TOP
          extended by org.apache.uima.jcas.cas.AnnotationBase
              extended by org.apache.uima.jcas.tcas.Annotation
                  extended by org.apache.uima.examples.SourceDocumentInformation
All Implemented Interfaces:
Cloneable, AnnotationBaseFS, FeatureStructure, 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 Wed Nov 22 16:51:13 EST 2006 XML source: C:/alally/dev/workspace_apache/uimaj-examples/src/main/resources/org/apache/uima/examples/SourceDocumentInformation.xml


Field Summary
static int type
           
static int typeIndexID
           
 
Fields inherited from class org.apache.uima.jcas.cas.TOP
addr, jcasType
 
Constructor Summary
protected SourceDocumentInformation()
          Never called.
  SourceDocumentInformation(int addr, TOP_Type type)
          Internal - constructor used by generator
  SourceDocumentInformation(JCas jcas)
           
  SourceDocumentInformation(JCas jcas, int begin, int end)
           
 
Method Summary
 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()
          used to obtain reference to the TOP_Type instance
 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
getBegin, getCoveredText, getEnd, getStart, setBegin, setEnd
 
Methods inherited from class org.apache.uima.jcas.cas.AnnotationBase
getSofa, getView
 
Methods inherited from class org.apache.uima.jcas.cas.TOP
addToIndexes, addToIndexes, equals, getAddress, getCAS, getCASImpl, getLowLevelCas, hashCode, removeFromIndexes, removeFromIndexes
 
Methods inherited from class org.apache.uima.cas.impl.FeatureStructureImpl
clone, getBooleanValue, getByteValue, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, prettyPrint, prettyPrint, prettyPrint, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.uima.cas.AnnotationBaseFS
getView
 
Methods inherited from interface org.apache.uima.cas.FeatureStructure
clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue
 

Field Detail

typeIndexID

public static final int typeIndexID

type

public static final int type
Constructor Detail

SourceDocumentInformation

protected SourceDocumentInformation()
Never called. Disable default constructor


SourceDocumentInformation

public SourceDocumentInformation(int addr,
                                 TOP_Type type)
Internal - constructor used by generator


SourceDocumentInformation

public SourceDocumentInformation(JCas jcas)

SourceDocumentInformation

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

getTypeIndexID

public int getTypeIndexID()
Description copied from class: TOP
used to obtain reference to the TOP_Type instance

Overrides:
getTypeIndexID in class Annotation
Returns:
the type array index

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.)


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.)


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.


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.


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.


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.


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.


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.



Copyright © 2006-2010 The Apache Software Foundation. All Rights Reserved.