|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJet.Tipster.Annotation
An Annotation assigns a type and a set of features to a portion of a Document.
| Field Summary | |
static int |
MAX_ANNOTATION_DEPTH
in converting an Annotation to a String, the maximum level of nesting of Annotations which will be printed. |
| Constructor Summary | |
Annotation(java.lang.String tp,
Span sp,
FeatureSet att)
|
|
| Method Summary | |
void |
assignId()
if the Annotation does not already have an 'id' feature, assigns an 'id' feature whose value is the unique (to the Document) identifier obtained by Document.getNextAnnotationId(). |
FeatureSet |
attributes()
|
int |
end()
returns the end of the span associated with the annotation. |
java.lang.Object |
get(java.lang.String feature)
Returns the value of attribute feature of the annotation. |
int |
getId()
returns the value of the 'id' feature (converted from an Integer or String to an int). |
void |
prepareToMakeString(int nestingLimit)
|
void |
put(java.lang.String feature,
java.lang.Object value)
Sets the value of attribute feature of the annotation to value. |
static void |
sort(java.util.Vector annotations)
sorts a Vector of Annotations based on the end of the span of each Annotation, highest end value first. |
Span |
span()
returns the span (of text) associated with the annotation. |
int |
start()
returns the start of the span associated with the annotation. |
java.lang.String |
toSGMLString()
|
java.lang.String |
toSGMLString(int nestingLimit,
boolean quoteValues)
returns a String representation of the Annotation, without information about the span of the annotation. |
java.lang.String |
toString()
returns a String representation of the Annotation, including the type, span, and attributes, enclosed in '<' and '>'. |
java.lang.String |
type()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAX_ANNOTATION_DEPTH
| Constructor Detail |
public Annotation(java.lang.String tp,
Span sp,
FeatureSet att)
| Method Detail |
public java.lang.String type()
public Span span()
public int start()
public int end()
public FeatureSet attributes()
public java.lang.Object get(java.lang.String feature)
public void put(java.lang.String feature,
java.lang.Object value)
public void assignId()
Document.getNextAnnotationId().
public int getId()
public void prepareToMakeString(int nestingLimit)
public java.lang.String toString()
public java.lang.String toSGMLString()
public java.lang.String toSGMLString(int nestingLimit,
boolean quoteValues)
public static void sort(java.util.Vector annotations)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||