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 SummaryNested Classes Modifier and Type Class Description static classAnnotation.AnnotationBuilderBuilder to buildAnnotation.
 - 
Constructor SummaryConstructors 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 SummaryAll 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- 
Annotationpublic Annotation() 
 - 
Annotationpublic Annotation(Annotation another) 
 - 
Annotationpublic Annotation(java.lang.String type, long start, long end, java.util.Map<java.lang.String,java.lang.String> features, java.lang.String label)
 - 
Annotationpublic Annotation(java.lang.String type, long start, long end)
 - 
Annotationpublic 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.
 - 
getTypepublic java.lang.String getType() 
 - 
setTypepublic Annotation setType(java.lang.String type) 
 - 
getStartpublic long getStart() 
 - 
setStartpublic Annotation setStart(long start) 
 - 
getEndpublic long getEnd() 
 - 
setEndpublic 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.
 - 
getLabelpublic java.lang.String getLabel() 
 - 
getCharRangepublic Range<java.lang.Integer> getCharRange() 
 - 
compareTopublic int compareTo(Annotation target) - Specified by:
- compareToin interface- java.lang.Comparable<Annotation>
 
 - 
toStringpublic java.lang.String toString() Returns a String representation of the Annotation- Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
newAnnotationpublic static Annotation.AnnotationBuilder newAnnotation() 
 
- 
 
-