|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.bio.db.AbstractBioEntryDB
org.biojavax.bio.db.AbstractRichSequenceDB
org.biojavax.bio.db.HashRichSequenceDB
public class HashRichSequenceDB
An implementation of RichSequenceDB that uses an underlying HashMap to store the RichSequence objects.
| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
SEQUENCES |
| Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite |
|---|
BIOENTRYS |
| Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite |
|---|
BIOENTRYS |
| Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
SEQUENCES |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.biojavax.bio.db.AbstractRichSequenceDB |
|---|
addBioEntry, addSequence, filter, getBioEntry, getBioEntryIterator, getBioEntrys, getBioEntrys, getRichSequenceIterator, getSequence, removeBioEntry, removeRichSequence, sequenceIterator |
| Methods inherited from class org.biojava.utils.AbstractChangeable |
|---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojavax.bio.db.RichSequenceDB |
|---|
getRichSequenceIterator, sequenceIterator |
| Methods inherited from interface org.biojava.bio.seq.db.SequenceDB |
|---|
filter |
| Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
addSequence, getSequence |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from interface org.biojavax.bio.db.BioEntryDB |
|---|
getBioEntryIterator |
| Methods inherited from interface org.biojavax.bio.db.BioEntryDBLite |
|---|
addBioEntry, getBioEntry, getBioEntrys, getBioEntrys, removeBioEntry |
| Methods inherited from interface org.biojavax.bio.db.RichSequenceDBLite |
|---|
removeRichSequence |
| Methods inherited from interface org.biojavax.bio.db.BioEntryDBLite |
|---|
addBioEntry, getBioEntry, getBioEntrys, getBioEntrys, removeBioEntry |
| Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
addSequence, getSequence |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Constructor Detail |
|---|
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 database
public HashRichSequenceDB(IDMaker idMaker,
String name)
idMaker - the object that will work out the default id for a sequencename - the name for this database| Method Detail |
|---|
public String getName()
SequenceDBLite
getName in interface SequenceDBLitegetName in interface BioEntryDBLitepublic IDMaker getIDMaker()
public RichSequence getRichSequence(String id)
throws BioException,
IllegalIDException
RichSequenceDBLite
getRichSequence in interface RichSequenceDBLiteid - the id to retrieve by
IllegalIDException - if the database doesn't know about the id
BioException
public RichSequenceDB getRichSequences(Set ids)
throws BioException,
IllegalIDException
RichSequenceDBLite
getRichSequences in interface RichSequenceDBLiteids - a set of ids to retrieve by
IllegalIDException - if the database doesn't know about the id
BioException
public RichSequenceDB getRichSequences(Set ids,
RichSequenceDB db)
throws BioException,
IllegalIDException
RichSequenceDBLite
getRichSequences in interface RichSequenceDBLiteids - a set of ids to retrieve bydb - a database to load the seqs into
IllegalIDException - if the database doesn't know about the id
BioExceptionpublic Set ids()
SequenceDB
ids in interface SequenceDBids in interface BioEntryDB
public void addRichSequence(RichSequence seq)
throws IllegalIDException,
BioException,
ChangeVetoException
addRichSequence in interface RichSequenceDBLiteaddRichSequence in class AbstractRichSequenceDBseq - the RichSequence to add
ChangeVetoException - if this addition was vetoed
IllegalIDException - if a uniqe ID could not be generated for RichSequence
BioException - if something goes wrong with adding the RichSequence
protected void addRichSequence(String id,
RichSequence seq)
throws IllegalIDException,
BioException,
ChangeVetoException
IllegalIDException
BioException
ChangeVetoException
public void removeSequence(String id)
throws IllegalIDException,
BioException,
ChangeVetoException
SequenceDBLite
removeSequence in interface SequenceDBLiteremoveSequence in class AbstractRichSequenceDBid - the ID of the sequence to remove
IllegalIDException - if there is no sequence for the ID
BioException - if something failed while removing the sequence for
that ID
ChangeVetoException - if either the database does not allow
sequences to be removed or the modification was vetoed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||