T
- public class AbstractSingleSequenceDataAdapter<T> extends AbstractBasicAlignmentModelView<T> implements SingleSequenceDataAdapter<T>
SingleSequenceDataAdapter
. Specifically the sequence ID
of the viewed sequence, the index of its first viewed token and the length of the viewed part
are stored. Additionally protected setter methods are offered.Modifier | Constructor and Description |
---|---|
protected |
AbstractSingleSequenceDataAdapter(AlignmentModel<T> underlyingModel,
java.lang.String sequenceID)
Creates a new instance of this class which views the whole length of a sequence in the underlying data
source.
|
protected |
AbstractSingleSequenceDataAdapter(AlignmentModel<T> underlyingModel,
java.lang.String sequenceID,
int offset,
int length)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
getLength()
Returns the length of this character sequence.
|
int |
getOffset()
Returns the index the first character in this sequence corresponds to in the original sequence in
the underlying sequence data provider.
|
java.lang.String |
getSequenceID()
The ID of the viewed sequence in the underlying sequence data provider.
|
protected void |
setLength(int length) |
protected void |
setOffset(int offset) |
protected void |
setSequenceID(java.lang.String sequenceID) |
getUnderlyingModel, setUnderlyingModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUnderlyingModel
protected AbstractSingleSequenceDataAdapter(AlignmentModel<T> underlyingModel, java.lang.String sequenceID, int offset, int length)
underlyingModel
- the alignment model that contains the sequence to be viewedsequenceID
- the ID used in provider
of the sequence to be viewedoffset
- the start index of the subsequence to be viewed (The first token has the index 0.)length
- the length of the subsequence to be viewedprotected AbstractSingleSequenceDataAdapter(AlignmentModel<T> underlyingModel, java.lang.String sequenceID)
underlyingModel
- the sequence data provider that contains the sequence to be viewedsequenceID
- the ID used in provider
of the sequence to be viewedpublic java.lang.String getSequenceID()
SingleSequenceDataAdapter
getSequenceID
in interface SingleSequenceDataAdapter<T>
protected void setSequenceID(java.lang.String sequenceID)
public int getOffset()
SingleSequenceDataAdapter
getOffset
in interface SingleSequenceDataAdapter<T>
protected void setOffset(int offset)
public int getLength()
getLength
in interface SingleSequenceDataAdapter<T>
protected void setLength(int length)