Package org.biojava.nbio.core.sequence
Class AccessionID
- java.lang.Object
-
- org.biojava.nbio.core.sequence.AccessionID
-
public class AccessionID extends Object
Used in Sequences as the unique identifier. If possible, set theDataSource
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
Constructors Constructor Description AccessionID()
Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
DataSource
getDataSource()
String
getID()
String
getIdentifier()
In case ifgetID()
is not unique, keeps the alternative id, e.g.Integer
getVersion()
In case if thegetID()
is not unique keeps the id version.int
hashCode()
void
setIdentifier(String identifier)
void
setVersion(Integer version)
String
toString()
-
-
-
Constructor Detail
-
AccessionID
public AccessionID()
Default constructor sets id t empty string
-
AccessionID
public AccessionID(String id)
Creates an id with default DataSource.LOCAL source- Parameters:
id
- non-null
-
AccessionID
public AccessionID(String id, DataSource source)
- Parameters:
id
-source
-
-
AccessionID
public AccessionID(String id, DataSource source, Integer version, String identifier)
-
-
Method Detail
-
getDataSource
public DataSource getDataSource()
- Returns:
- the source
-
getVersion
public Integer getVersion()
In case if thegetID()
is not unique keeps the id version.- Returns:
- the version
-
setVersion
public void setVersion(Integer version)
-
getIdentifier
public String getIdentifier()
In case ifgetID()
is not unique, keeps the alternative id, e.g. NCBI GI number. This may be null.- Returns:
-
setIdentifier
public void setIdentifier(String identifier)
-
-