Class SequenceViewerExtension.SequenceAnnotationWrapper
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.SequenceViewerExtension.SequenceAnnotationWrapper
-
- Enclosing class:
- SequenceViewerExtension
public abstract static class SequenceViewerExtension.SequenceAnnotationWrapper extends java.lang.Object
Wraps aSequenceAnnotation
and provides extra information about the location (sequence, track) of the annotation. Plugins should not extend this class. Only the sequence viewer should extend it and it will provide implementations to sequence viewer extensions. For test cases, plugins may wish to usePropertyRetrieverAndEditor.forSequences
orPropertyRetrieverAndEditor.forAlignment
to obtain a PropertyRetrieverAndEditor, and callPropertyRetrieverAndEditor.getVisibleAnnotations
to obtain SequenceAnnotationWrappers.
-
-
Constructor Summary
Constructors Constructor Description SequenceAnnotationWrapper()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SequenceViewerExtension.SequenceAnnotationWrapper
forAnnotation(SequenceAnnotation annotation, int sequenceIndex, int trackIndex, boolean isSelected)
Wraps aSequenceAnnotation
and provides extra information about the location (sequence, track) of the annotation.abstract SequenceAnnotationInterval
getInterval(int intervalIndex)
abstract java.util.List<SequenceAnnotationInterval>
getIntervals()
abstract int
getNumberOfIntervals()
abstract java.util.List<SequenceAnnotationQualifier>
getQualifiers()
java.lang.String
getQualifierValue(java.lang.String name)
abstract SequenceAnnotation
getSequenceAnnotation()
abstract int
getSequenceIndex()
abstract int
getTrackIndex()
abstract java.lang.String
getType()
abstract boolean
isSelected()
-
-
-
Method Detail
-
getSequenceAnnotation
public abstract SequenceAnnotation getSequenceAnnotation()
- Returns:
- the annotation wrapped by this wrapper
-
getSequenceIndex
public abstract int getSequenceIndex()
- Returns:
- the 0-based index of the sequence this annotation is on. May be -1 for consensus annotations.
-
isSelected
public abstract boolean isSelected()
- Returns:
- true if this annotation is selected
-
getTrackIndex
public abstract int getTrackIndex()
- Returns:
- the index of the track (if any) this annotation is on. -1 for no track. This index can be used with
SequenceViewerExtension.PropertyRetrieverAndEditor.getTrackName(int, int)
-
getQualifiers
public abstract java.util.List<SequenceAnnotationQualifier> getQualifiers()
- Returns:
- the annotation qualifiers. Equivalent to
getSequenceAnnotation()
.getQualifiers()
but more efficient
-
getIntervals
public abstract java.util.List<SequenceAnnotationInterval> getIntervals()
- Returns:
- the annotation intervals. Equivalent to
getSequenceAnnotation()
.getIntervals()
but more efficient
-
getNumberOfIntervals
public abstract int getNumberOfIntervals()
- Returns:
- the number of annotation intervals. Equivalent to
getSequenceAnnotation()
.getNumberOfIntervals()
but more efficient - Since:
- API 4.810 (Geneious 8.1.0)
-
getInterval
public abstract SequenceAnnotationInterval getInterval(int intervalIndex)
- Returns:
- one of the annotation intervals. Equivalent to
getSequenceAnnotation()
.getInterval(...)
} but more efficient - Since:
- API 4.810 (Geneious 8.1.0)
-
getType
public abstract java.lang.String getType()
- Returns:
- the annotation type of this annotation. Equivalent to
getSequenceAnnotation()
.getType()
but more efficient
-
getQualifierValue
public java.lang.String getQualifierValue(java.lang.String name)
- Returns:
- the value of one qualifier. Equivalent to
getSequenceAnnotation()
.getQualifierValue(...)
} but more efficient - Since:
- API 4.900 (Geneious 9.0.0)
-
forAnnotation
public static SequenceViewerExtension.SequenceAnnotationWrapper forAnnotation(SequenceAnnotation annotation, int sequenceIndex, int trackIndex, boolean isSelected)
Wraps aSequenceAnnotation
and provides extra information about the location (sequence, track) of the annotation.- Parameters:
annotation
- the annotation to wrap.sequenceIndex
- the 0-based index of the sequence this annotation is on. May be -1 for consensus annotations.trackIndex
- the 0-based index of the track. May be -1 for no track.isSelected
- true if this annotation is selected.- Returns:
- the wrapped
SequenceAnnotation
- Since:
- API 4.900 (Geneious 9.0.0)
-
-