org.apache.uima.cas.impl
Class AnnotationImpl

java.lang.Object
  extended by org.apache.uima.cas.impl.FeatureStructureImpl
      extended by org.apache.uima.cas.impl.FeatureStructureImplC
          extended by org.apache.uima.cas.impl.AnnotationBaseImpl
              extended by org.apache.uima.cas.impl.AnnotationImpl
All Implemented Interfaces:
java.lang.Cloneable, AnnotationBaseFS, FeatureStructure, AnnotationFS

public class AnnotationImpl
extends AnnotationBaseImpl
implements AnnotationFS

Class comment for AnnotationImpl.java goes here.


Field Summary
 
Fields inherited from class org.apache.uima.cas.impl.FeatureStructureImplC
addr, casImpl
 
Constructor Summary
protected AnnotationImpl()
          Constructor for AnnotationImpl.
  AnnotationImpl(int addr, CASImpl cas)
          Constructor for AnnotationImpl.
 
Method Summary
 int getBegin()
          Get the start position of the annotation as character offset into the text.
 java.lang.String getCoveredText()
          Get the text covered by an annotation as a string.
 int getEnd()
          Get the end position of the annotation as character offset into the text.
 java.lang.String toString()
           
 java.lang.String toString(int indent)
           
 
Methods inherited from class org.apache.uima.cas.impl.AnnotationBaseImpl
getView
 
Methods inherited from class org.apache.uima.cas.impl.FeatureStructureImplC
equals, getAddress, getCAS, getCASImpl, hashCode, setUp
 
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
 
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
 

Constructor Detail

AnnotationImpl

protected AnnotationImpl()
Constructor for AnnotationImpl.


AnnotationImpl

public AnnotationImpl(int addr,
                      CASImpl cas)
Constructor for AnnotationImpl.

Parameters:
addr -
cas -
Method Detail

getBegin

public int getBegin()
Description copied from interface: AnnotationFS
Get the start position of the annotation as character offset into the text. The smallest possible start position is 0, the offset of the first character in the text.

Specified by:
getBegin in interface AnnotationFS
Returns:
The start position.
See Also:
org.apache.uima.cas.text.AnnotationFS#getStart()

getEnd

public int getEnd()
Description copied from interface: AnnotationFS
Get the end position of the annotation as character offset into the text. The end position points at the first character after the annotation, such that (getEnd()-getBegin()) == getCoveredText().length().

Specified by:
getEnd in interface AnnotationFS
Returns:
The end position.
See Also:
AnnotationFS.getEnd()

getCoveredText

public java.lang.String getCoveredText()
Description copied from interface: AnnotationFS
Get the text covered by an annotation as a string. If docText is your document text and annot an annotation, then annot.getCoveredText().equals(docText.substring(annot.getBegin(), annot.getEnd())).

Specified by:
getCoveredText in interface AnnotationFS
Returns:
String
See Also:
AnnotationFS.getCoveredText()

toString

public java.lang.String toString()
Overrides:
toString in class AnnotationBaseImpl

toString

public java.lang.String toString(int indent)
Overrides:
toString in class AnnotationBaseImpl


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