Package org.biojava.nbio.core.sequence
Class AccessionID
java.lang.Object
org.biojava.nbio.core.sequence.AccessionID
Used in Sequences as the unique identifier. If possible, set the
DataSource
to know the
source of the id. This allows a SequenceProxy to gather features or related sequences
Protein->Gene as an example. When parsing a Blast file it is also possible
to identify the type of ID- Author:
- Scooter Willis, Jacek Grzebyta
-
Constructor Summary
ConstructorDescriptionDefault constructor sets id t empty stringAccessionID
(String id) Creates an id with default DataSource.LOCAL sourceAccessionID
(String id, DataSource source) AccessionID
(String id, DataSource source, Integer version, String identifier) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getID()
In case ifgetID()
is not unique, keeps the alternative id, e.g.In case if thegetID()
is not unique keeps the id version.int
hashCode()
void
setIdentifier
(String identifier) void
setVersion
(Integer version) toString()
-
Constructor Details
-
AccessionID
public AccessionID()Default constructor sets id t empty string -
AccessionID
Creates an id with default DataSource.LOCAL source- Parameters:
id
- non-null
-
AccessionID
- Parameters:
id
-source
-
-
AccessionID
-
-
Method Details
-
getID
- Returns:
- the id
-
getDataSource
- Returns:
- the source
-
equals
-
hashCode
-
getVersion
In case if thegetID()
is not unique keeps the id version.- Returns:
- the version
-
setVersion
-
getIdentifier
In case ifgetID()
is not unique, keeps the alternative id, e.g. NCBI GI number. This may be null.- Returns:
-
setIdentifier
-
toString
-