Class 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 a PipelineField
    • 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()
      • 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:
        compareTo in interface java.lang.Comparable<Annotation>
      • toString

        public java.lang.String toString()
        Returns a String representation of the Annotation
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object