Package org.biojavax
Interface RankedDocRef
-
- All Superinterfaces:
Changeable,Comparable
- All Known Implementing Classes:
SimpleRankedDocRef
public interface RankedDocRef extends Comparable, Changeable
Represents a documentary reference. Relates to the bioentryreference table in BioSQL.- Since:
- 1.5
- Author:
- Richard Holland, gwaldon
- See Also:
DocRef
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeTypeLOCATIONstatic ChangeTypeRANK
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DocRefgetDocumentReference()Represents a reference to a document.IntegergetEnd()The end position in the sequence that this reference is referred to from.RichLocationgetLocation()If this object was constructed using a location instead of two integers, then this method will return that location.intgetRank()The rank of this reference.IntegergetStart()The start position in the sequence that this reference is referred to from.voidsetLocation(RichLocation location)Set the location of this reference.voidsetRank(int rank)Set the rank of this reference.-
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
RANK
static final ChangeType RANK
-
LOCATION
static final ChangeType LOCATION
-
-
Method Detail
-
getDocumentReference
DocRef getDocumentReference()
Represents a reference to a document. This value is intended to be set by the constructor of the implementing class.- Returns:
- the document reference.
-
getStart
Integer getStart()
The start position in the sequence that this reference is referred to from. This value is intended to be set by the constructor of the implementing class. The position returned is from 1 to the length of the sequence.- Returns:
- the start position.
-
getEnd
Integer getEnd()
The end position in the sequence that this reference is referred to from. This value is intended to be set by the constructor of the implementing class. The position returned is from 1 to the length of the sequence.- Returns:
- the end position.
-
getLocation
RichLocation getLocation()
If this object was constructed using a location instead of two integers, then this method will return that location. The getStart() and getEnd() methods will then return the min and max of that location, using the default location position resolver to resolve them to exact positions. If this object was constructed using two integers, then this method will return a simple location whose min and max correspond to those integers.- Returns:
- the location of this reference on the sequence.
-
setLocation
void setLocation(RichLocation location) throws ChangeVetoException
Set the location of this reference.- Parameters:
location- the location to use.- Throws:
ChangeVetoException- if the new location is unacceptable.
-
getRank
int getRank()
The rank of this reference. This value is intended to be set by the constructor of the implementing class.- Returns:
- the rank.
-
setRank
void setRank(int rank) throws ChangeVetoException
Set the rank of this reference.- Parameters:
rank- the rank to use.- Throws:
ChangeVetoException- if the new rank is unacceptable.
-
-