Class Annotation
- java.lang.Object
-
- com.lucidworks.apollo.common.pipeline.Annotation
-
- All Implemented Interfaces:
java.lang.Comparable<Annotation>
public class Annotation extends java.lang.Object implements java.lang.Comparable<Annotation>
Implementation of an Annotation. Has a type, metadata and start and end offsets referring to the position in the text of aPipelineField
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotation.AnnotationBuilderBuilder to buildAnnotation.
-
Constructor Summary
Constructors Constructor Description Annotation()Annotation(Annotation another)Annotation(java.lang.String type, long start, long end)Annotation(java.lang.String type, long start, long end, java.util.Map<java.lang.String,java.lang.String> features)Annotation(java.lang.String type, long start, long end, java.util.Map<java.lang.String,java.lang.String> features, java.lang.String label)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AnnotationaddFeature(java.lang.String name, java.lang.String val)Deprecated.voidaddFeatures(java.util.Map<java.lang.String,java.lang.String> features)Deprecated.intcompareTo(Annotation target)booleanequals(java.lang.Object o)Range<java.lang.Integer>getCharRange()longgetEnd()intgetFeatureCount()Deprecated.java.util.Map<java.lang.String,java.lang.String>getFeatures()Deprecated.java.lang.StringgetLabel()longgetStart()java.lang.StringgetType()inthashCode()static Annotation.AnnotationBuildernewAnnotation()AnnotationsetEnd(long end)AnnotationsetStart(long start)AnnotationsetType(java.lang.String type)java.lang.StringtoString()Returns a String representation of the Annotation
-
-
-
Constructor Detail
-
Annotation
public Annotation()
-
Annotation
public Annotation(Annotation another)
-
Annotation
public Annotation(java.lang.String type, long start, long end, java.util.Map<java.lang.String,java.lang.String> features, java.lang.String label)
-
Annotation
public Annotation(java.lang.String type, long start, long end)
-
Annotation
public Annotation(java.lang.String type, long start, long end, java.util.Map<java.lang.String,java.lang.String> features)
-
-
Method Detail
-
getFeatureCount
@Deprecated public int getFeatureCount()
Deprecated.
-
getType
public java.lang.String getType()
-
setType
public Annotation setType(java.lang.String type)
-
getStart
public long getStart()
-
setStart
public Annotation setStart(long start)
-
getEnd
public long getEnd()
-
setEnd
public Annotation setEnd(long end)
-
getFeatures
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getFeatures()
Deprecated.
-
addFeatures
@Deprecated public void addFeatures(java.util.Map<java.lang.String,java.lang.String> features)
Deprecated.
-
addFeature
@Deprecated public Annotation addFeature(java.lang.String name, java.lang.String val)
Deprecated.
-
getLabel
public java.lang.String getLabel()
-
getCharRange
public Range<java.lang.Integer> getCharRange()
-
compareTo
public int compareTo(Annotation target)
- Specified by:
compareToin interfacejava.lang.Comparable<Annotation>
-
toString
public java.lang.String toString()
Returns a String representation of the Annotation- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
newAnnotation
public static Annotation.AnnotationBuilder newAnnotation()
-
-