|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AbstractFeatureBearer
gate.annotation.AnnotationImpl
public class AnnotationImpl
Provides an implementation for the interface gate.Annotation
Field Summary | |
---|---|
protected Node |
end
The end node |
protected gate.annotation.AnnotationImpl.EventsHandler |
eventHandler
The listener for the events coming from the features. |
protected Node |
start
The start node |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Constructor Summary | |
---|---|
protected |
AnnotationImpl(Integer id,
Node start,
Node end,
String type,
FeatureMap features)
Constructor. |
Method Summary | |
---|---|
void |
addAnnotationListener(AnnotationListener l)
Adds an annotation listener |
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. |
protected void |
fireAnnotationUpdated(AnnotationEvent e)
|
Node |
getEndNode()
The end node. |
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 anAnnot)
This verifies if this annotation is compatible with another one. |
boolean |
isCompatible(Annotation anAnnot,
Set aFeatureNamesSet)
This verifies if this annotation is compatible with another one, given a set with certain keys. |
boolean |
isPartiallyCompatible(Annotation anAnnot)
This method verifies if two annotation and are partially compatible. |
boolean |
isPartiallyCompatible(Annotation anAnnot,
Set aFeatureNamesSet)
This method verifies if two annotation and are partially compatible, given a set with certain keys. |
boolean |
overlaps(Annotation aAnnot)
This method tells if this overlaps aAnnot. |
void |
removeAnnotationListener(AnnotationListener l)
Removes an annotation listener |
void |
setFeatures(FeatureMap features)
Set the feature set. |
String |
toString()
String representation of hte annotation |
Methods inherited from class gate.util.AbstractFeatureBearer |
---|
getFeatures |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.util.FeatureBearer |
---|
getFeatures |
Field Detail |
---|
protected gate.annotation.AnnotationImpl.EventsHandler eventHandler
protected Node start
protected Node end
Constructor Detail |
---|
protected 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 SimpleAnnotation
public Node getStartNode()
getStartNode
in interface SimpleAnnotation
public Node getEndNode()
getEndNode
in interface SimpleAnnotation
public String toString()
toString
in class Object
public int compareTo(Object o) throws ClassCastException
compareTo
in interface SimpleAnnotation
compareTo
in interface Comparable
ClassCastException
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public void setFeatures(FeatureMap features)
setFeatures
in interface FeatureBearer
setFeatures
in class AbstractFeatureBearer
public boolean isCompatible(Annotation anAnnot)
isCompatible
in interface Annotation
anAnnot
- a gate Annotation. If anAnnotation is null then false is
returned.
true
if aAnnot is compatible with this> and
false
otherwise.public boolean isCompatible(Annotation anAnnot, Set aFeatureNamesSet)
isCompatible
in interface Annotation
anAnnot
- a gate Annotation. If param is null, it will return false.aFeatureNamesSet
- is a set containing certian key that will be
intersected with this's FeatureMap's keys.If param is null then
isCompatible(Annotation) will be called.
true
if aAnnot is compatible with this> and
false
otherwise.public boolean isPartiallyCompatible(Annotation anAnnot)
isPartiallyCompatible
in interface Annotation
anAnnot
- a gate Annotation.
true
if this is partially compatible with
anAnnot and false
otherwise.public boolean isPartiallyCompatible(Annotation anAnnot, Set aFeatureNamesSet)
isPartiallyCompatible
in interface Annotation
anAnnot
- a gate Annotation. If param is null, the method will return
false.aFeatureNamesSet
- is a set containing certian key that will be
intersected with this's FeatureMap's keys.If param is null then
isPartiallyCompatible(Annotation) will be called.
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.public void removeAnnotationListener(AnnotationListener l)
removeAnnotationListener
in interface Annotation
public void addAnnotationListener(AnnotationListener l)
addAnnotationListener
in interface Annotation
protected void fireAnnotationUpdated(AnnotationEvent e)
e
-
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |