public class HashRichSequenceDB extends AbstractRichSequenceDB implements RichSequenceDB
BIOENTRYS
SEQUENCES
Constructor and Description |
---|
HashRichSequenceDB()
Generate a HashRichSequenceDB object that will use byName to generate ids for
sequences and have a null name.
|
HashRichSequenceDB(IDMaker idMaker)
Generate a HashRichSequenceDB object that will use idMaker to generate ids for
sequences and have a null name.
|
HashRichSequenceDB(IDMaker idMaker,
String name)
Generate a HashRichSequenceDB object that will use idMaker to generate ids for
sequences and have the requested name.
|
HashRichSequenceDB(String name)
Generate a HashRichSequenceDB object that will use byName to generate ids and
will have the requested name.
|
Modifier and Type | Method and Description |
---|---|
void |
addRichSequence(RichSequence seq)
Add a sequence.
|
protected void |
addRichSequence(String id,
RichSequence seq) |
IDMaker |
getIDMaker()
Retrieve the IDMaker associated with this database.
|
String |
getName()
Get the name of this sequence database.
|
RichSequence |
getRichSequence(String id)
Retrieve a single RichSequence by its id.
|
RichSequenceDB |
getRichSequences(Set ids)
Retrieve multiple RichSequence by its id.
|
RichSequenceDB |
getRichSequences(Set ids,
RichSequenceDB db)
Retrieve multiple RichSequence into a specific sequence database.
|
Set |
ids()
Get an immutable set of all of the IDs in the database.
|
void |
removeSequence(String id)
Remove the sequence associated with an ID from the database.
|
addBioEntry, addSequence, filter, getBioEntry, getBioEntryIterator, getBioEntrys, getBioEntrys, getRichSequenceIterator, getSequence, removeBioEntry, removeRichSequence, sequenceIterator
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRichSequenceIterator, sequenceIterator
filter
getBioEntryIterator
removeRichSequence
addBioEntry, getBioEntry, getBioEntrys, getBioEntrys, removeBioEntry
addSequence, getSequence
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public HashRichSequenceDB()
public HashRichSequenceDB(IDMaker idMaker)
idMaker
- the object that will work out the default id for a sequencepublic HashRichSequenceDB(String name)
name
- the name for this databasepublic HashRichSequenceDB(IDMaker idMaker, String name)
idMaker
- the object that will work out the default id for a sequencename
- the name for this databasepublic String getName()
SequenceDBLite
getName
in interface SequenceDBLite
getName
in interface BioEntryDBLite
public IDMaker getIDMaker()
public RichSequence getRichSequence(String id) throws BioException, IllegalIDException
RichSequenceDBLite
getRichSequence
in interface RichSequenceDBLite
id
- the id to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
public RichSequenceDB getRichSequences(Set ids) throws BioException, IllegalIDException
RichSequenceDBLite
getRichSequences
in interface RichSequenceDBLite
ids
- a set of ids to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
public RichSequenceDB getRichSequences(Set ids, RichSequenceDB db) throws BioException, IllegalIDException
RichSequenceDBLite
getRichSequences
in interface RichSequenceDBLite
ids
- a set of ids to retrieve bydb
- a database to load the seqs intoIllegalIDException
- if the database doesn't know about the idBioException
public Set ids()
SequenceDB
ids
in interface SequenceDB
ids
in interface BioEntryDB
public void addRichSequence(RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException
addRichSequence
in interface RichSequenceDBLite
addRichSequence
in class AbstractRichSequenceDB
seq
- the RichSequence to addChangeVetoException
- if this addition was vetoedIllegalIDException
- if a uniqe ID could not be generated for RichSequenceBioException
- if something goes wrong with adding the RichSequenceprotected void addRichSequence(String id, RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException
public void removeSequence(String id) throws IllegalIDException, BioException, ChangeVetoException
SequenceDBLite
removeSequence
in interface SequenceDBLite
removeSequence
in class AbstractRichSequenceDB
id
- the ID of the sequence to removeIllegalIDException
- if there is no sequence for the IDBioException
- if something failed while removing the sequence for
that IDChangeVetoException
- if either the database does not allow
sequences to be removed or the modification was vetoedCopyright © 2014 BioJava. All rights reserved.