|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.annotation.AnnotationImpl
Provides an implementation for the interface gate.Annotation
Field Summary | |
private static boolean |
DEBUG
Debug flag |
(package private) Node |
end
The end node |
(package private) FeatureMap |
features
The features of the annotation |
(package private) Integer |
id
The id of this annotation (for persitency resons) |
(package private) static long |
serialVersionUID
Freeze the serialization UID. |
(package private) Node |
start
The start node |
(package private) String |
type
The type of the annotation |
Constructor Summary | |
(package private) |
AnnotationImpl(Integer id,
Node start,
Node end,
String type,
FeatureMap features)
Constructor. |
Method Summary | |
boolean |
coextensive(Annotation anAnnot)
Two Annotation are coextensive if their offsets are the same. |
int |
compareTo(Object o)
Ordering |
boolean |
equals(Object obj)
Returns true if two annotation are Equals. |
Node |
getEndNode()
The end node. |
FeatureMap |
getFeatures()
The features, or content of this arc (corresponds to TIPSTER "attributes", and to LDC "label", which is the simplest case). |
Integer |
getId()
The ID of the annotation. |
Node |
getStartNode()
The start node. |
String |
getType()
The type of the annotation (corresponds to TIPSTER "name"). |
int |
hashCode()
When equals called on two annotations returns true, is REQUIRED that the value hashCode for each annotation to be the same. |
boolean |
isCompatible(Annotation aAnnot)
This verifies if this annotation is compatible with another one. |
boolean |
isPartiallyCompatible(Annotation aAnnot)
This method verifies if two annotation and are partially compatible. |
boolean |
overlaps(Annotation aAnnot)
This method tells if this overlaps aAnnot. |
void |
setFeatures(FeatureMap features)
Set the feature set |
String |
toString()
String representation of hte annotation |
Methods inherited from class gate.util.AbstractFeatureBearer |
getName, setName |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface gate.util.FeatureBearer |
getName, setName |
Field Detail |
private static final boolean DEBUG
static final long serialVersionUID
Integer id
String type
FeatureMap features
Node start
Node end
Constructor Detail |
AnnotationImpl(Integer id, Node start, Node end, String type, FeatureMap features)
id
- The id of the new annotation;start
- The node from where the annotation will depart;end
- The node where trhe annotation ends;type
- The type of the new annotation;features
- The features of the annotation.Method Detail |
public Integer getId()
getId
in interface IdBearer
public String getType()
getType
in interface Annotation
public FeatureMap getFeatures()
getFeatures
in interface FeatureBearer
getFeatures
in class AbstractFeatureBearer
public void setFeatures(FeatureMap features)
setFeatures
in interface FeatureBearer
setFeatures
in class AbstractFeatureBearer
public Node getStartNode()
getStartNode
in interface Annotation
public Node getEndNode()
getEndNode
in interface Annotation
public String toString()
toString
in class Object
public int compareTo(Object o) throws ClassCastException
compareTo
in interface Annotation
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean isCompatible(Annotation aAnnot)
isCompatible
in interface Annotation
aAnnot
- a gate Annotation.true
if aAnnot is compatible with this> and
false
otherwise.public boolean isPartiallyCompatible(Annotation aAnnot)
isPartiallyCompatible
in interface Annotation
aAnnot
- a gate Annotation.true
if this is partially compatible with
aAnnot and false
otherwise.public boolean coextensive(Annotation anAnnot)
coextensive
in interface Annotation
anAnnot
- A Gate annotation.true
if two annotation hit the same possition and
false
otherwisepublic boolean overlaps(Annotation aAnnot)
overlaps
in interface Annotation
aAnnot
- a gate Annotation.true
if they overlap and false
false if
they don't.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |