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
public class BioSQLRichSequenceDB extends AbstractRichSequenceDB
- 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
Constructors Constructor Description BioSQLRichSequenceDB(Object session)Creates a new instance of BioSQLRichSequenceDBBioSQLRichSequenceDB(String name, Object session)Creates a new instance of BioSQLRichSequenceDB 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRichSequence(RichSequence seq)Adds a sequence to the database.FeatureHolderfilter(FeatureFilter ff)Query features attached to all sequences in this database.RichSequencefullyLoadRichSequence(RichSequence id)ObjectgetHibernateSession()StringgetName()Get the name of this sequence database.RichSequencegetRichSequence(String id)Retrieve a single RichSequence by its id.RichSequenceDBgetRichSequences(Set ids)Retrieve multiple RichSequence by its id.RichSequenceDBgetRichSequences(Set ids, RichSequenceDB db)Retrieve multiple RichSequence into a specific sequence database.Setids()Get an immutable set of all of the IDs in the database.FeatureHolderprocessFeatureFilter(FeatureFilter ff)voidremoveRichSequence(String id)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 Detail
- 
BioSQLRichSequenceDB
public BioSQLRichSequenceDB(Object session)
Creates a new instance of BioSQLRichSequenceDB 
- 
BioSQLRichSequenceDB
public BioSQLRichSequenceDB(String name, Object session)
Creates a new instance of BioSQLRichSequenceDB 
 - 
 
- 
Method Detail
- 
getName
public String getName()
Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Returns:
 - the name of the sequence database, which may be null.
 
 
- 
getHibernateSession
public Object getHibernateSession()
 
- 
processFeatureFilter
public FeatureHolder processFeatureFilter(FeatureFilter ff)
 
- 
filter
public FeatureHolder filter(FeatureFilter ff)
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
public Set 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
public RichSequence fullyLoadRichSequence(RichSequence id) throws IllegalIDException, BioException
- Throws:
 IllegalIDExceptionBioException
 
- 
getRichSequence
public RichSequence getRichSequence(String id) throws IllegalIDException, BioException
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
public RichSequenceDB getRichSequences(Set ids) throws BioException, IllegalIDException
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
 
 - 
 
 -