Package org.biojavax.bio.db.biosql
Class BioSQLRichSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.bio.db.AbstractBioEntryDB
org.biojavax.bio.db.AbstractRichSequenceDB
org.biojavax.bio.db.biosql.BioSQLRichSequenceDB
- All Implemented Interfaces:
SequenceDB
,SequenceDBLite
,Changeable
,BioEntryDB
,BioEntryDBLite
,RichSequenceDB
,RichSequenceDBLite
- Since:
- 1.5
- Author:
- Richard Holland, David Scott
-
Field Summary
Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
BIOENTRYS
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES
-
Constructor Summary
ConstructorsConstructorDescriptionBioSQLRichSequenceDB
(Object session) Creates a new instance of BioSQLRichSequenceDBBioSQLRichSequenceDB
(String name, Object session) Creates a new instance of BioSQLRichSequenceDB -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a sequence to the database.filter
(FeatureFilter ff) Query features attached to all sequences in this database.getName()
Get the name of this sequence database.Retrieve a single RichSequence by its id.getRichSequences
(Set ids) Retrieve multiple RichSequence by its id.getRichSequences
(Set ids, RichSequenceDB db) Retrieve multiple RichSequence into a specific sequence database.ids()
Get an immutable set of all of the IDs in the database.void
Remove the RichSequence associated with an ID from the database.Methods inherited from class org.biojavax.bio.db.AbstractRichSequenceDB
addBioEntry, addSequence, getBioEntry, getBioEntryIterator, getBioEntrys, getBioEntrys, getRichSequenceIterator, getSequence, removeBioEntry, removeSequence, 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.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
BioSQLRichSequenceDB
Creates a new instance of BioSQLRichSequenceDB -
BioSQLRichSequenceDB
Creates a new instance of BioSQLRichSequenceDB
-
-
Method Details
-
getName
Description copied from interface:SequenceDBLite
Get the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getHibernateSession
-
processFeatureFilter
-
filter
Description copied from interface:SequenceDB
Query features attached to all sequences in this database. This is equivalent to applyingfilter
to all sequences then merging the results.- Specified by:
filter
in interfaceSequenceDB
- Overrides:
filter
in classAbstractRichSequenceDB
- Parameters:
ff
- aFeatureFilter
.
-
ids
Description copied from interface:SequenceDB
Get an immutable set of all of the IDs in the database. The ids are legal arguments to getSequence.- Returns:
- a Set of ids - at the moment, strings
-
fullyLoadRichSequence
- Throws:
IllegalIDException
BioException
-
getRichSequence
Description copied from interface:RichSequenceDBLite
Retrieve a single RichSequence by its id.- Parameters:
id
- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
getRichSequences
Description copied from interface:RichSequenceDBLite
Retrieve multiple RichSequence by its id.- Parameters:
ids
- a set of ids to retrieve by- Returns:
- the RichSequences with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
getRichSequences
public RichSequenceDB getRichSequences(Set ids, RichSequenceDB db) throws BioException, IllegalIDException Description copied from interface:RichSequenceDBLite
Retrieve multiple RichSequence into a specific sequence database. If that database is null, a new HashRichSequenceDB is used.- Parameters:
ids
- a set of ids to retrieve bydb
- a database to load the seqs into- Returns:
- the RichSequences with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
removeRichSequence
public void removeRichSequence(String id) throws IllegalIDException, BioException, ChangeVetoException Description copied from interface:RichSequenceDBLite
Remove the RichSequence associated with an ID from the database.- Specified by:
removeRichSequence
in interfaceRichSequenceDBLite
- Overrides:
removeRichSequence
in classAbstractRichSequenceDB
- Parameters:
id
- the ID of the RichSequence to remove- Throws:
IllegalIDException
- if there is no RichSequence for the IDBioException
- if something failed while removing the RichSequence for that IDChangeVetoException
- if either the database does not allow RichSequences to be removed or the modification was vetoed
-
addRichSequence
public void addRichSequence(RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException Description copied from interface:RichSequenceDBLite
Adds a sequence to the database.- Specified by:
addRichSequence
in interfaceRichSequenceDBLite
- Overrides:
addRichSequence
in classAbstractRichSequenceDB
- Parameters:
seq
- the RichSequence to add- Throws:
IllegalIDException
- if a uniqe ID could not be generated for RichSequenceBioException
- if something goes wrong with adding the RichSequenceChangeVetoException
- if either the database does not allow RichSequences to be added or the modification was vetoed
-