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
BIOENTRYSFields 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 TypeMethodDescriptionvoidAdds 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.voidRemove 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, sequenceIteratorMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SequenceDBLiteGet the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getHibernateSession
-
processFeatureFilter
-
filter
Description copied from interface:SequenceDBQuery features attached to all sequences in this database. This is equivalent to applyingfilterto all sequences then merging the results.- Specified by:
filterin interfaceSequenceDB- Overrides:
filterin classAbstractRichSequenceDB- Parameters:
ff- aFeatureFilter.
-
ids
Description copied from interface:SequenceDBGet 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:
IllegalIDExceptionBioException
-
getRichSequence
Description copied from interface:RichSequenceDBLiteRetrieve 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:RichSequenceDBLiteRetrieve 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:RichSequenceDBLiteRetrieve 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:RichSequenceDBLiteRemove the RichSequence associated with an ID from the database.- Specified by:
removeRichSequencein interfaceRichSequenceDBLite- Overrides:
removeRichSequencein 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:RichSequenceDBLiteAdds a sequence to the database.- Specified by:
addRichSequencein interfaceRichSequenceDBLite- Overrides:
addRichSequencein 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
-