Class SequenceAnnotationGroup


  • public final class SequenceAnnotationGroup
    extends java.lang.Object
    An immutable class representing a collection of related SequenceAnnotation types.

    Annotations in the same group are positioned in the same row as each other if possible in the sequence viewer. SequenceAnnotationGroups may also be returned from SequenceAnnotationGenerator.getGeneratedAnnotationGroup().

    Note: SequenceAnnotationGroups are not used for associated individual annotations with other individual annotations. Individual annotations can be associated that way using SequenceAnnotation.KEY_ANNOTATION_GROUP.

    • Constructor Detail

      • SequenceAnnotationGroup

        public SequenceAnnotationGroup​(java.lang.String groupName,
                                       java.lang.String... annotationTypes)
        construct a new SequenceAnnotationGroup with the specified name and types
        Parameters:
        groupName - a human readable name for this group
        annotationTypes - the annotation types this group contains. Usually, one of SequenceAnnotation.TYPE_*. If no types are specified, the group is assumed to contain a single type matching the group name
    • Method Detail

      • getAnnotationGroups

        public static java.util.List<SequenceAnnotationGroup> getAnnotationGroups()
        Get all available annotation groups
        Returns:
        all available annotation groups
      • getAnnotationGroup

        public static SequenceAnnotationGroup getAnnotationGroup​(java.lang.String annotationType)
        Get the annotation group that contains this annotation type
        Parameters:
        annotationType - the annotation type to get the group for (case insensitive)
        Returns:
        the annotation group that contains this annotation type or null if this annotation type is not a member of any group.
      • getAnnotationTypes

        public java.util.List<java.lang.String> getAnnotationTypes()
        Get all of the annotations types contained within this group
        Returns:
        all of the annotations types contained within this group
      • getGroupName

        public java.lang.String getGroupName()
        Get a name suitable for displaying to an end user describing the annotation types within this group.
        Returns:
        a name suitable for displaying to an end user describing the annotation types within this group.
      • toString

        public java.lang.String toString()
        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