Package org.biojava.bio.seq.db.biosql
Class BioSQLSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB
- All Implemented Interfaces:
SequenceDB,SequenceDBLite,Changeable
Deprecated.
Use hibernate and org.biojavax.bio.db.*
SequenceDB keyed off a BioSQL database. This is an almost-complete
implementation of the BioJava Sequence, SequenceDB, and Feature interfaces,
and can be used in a wide range of applications.
Note: It now uses BioSQL schema version 1.0 (Post Singapore)
All previous versions are no longer supported.
- Since:
- 1.3
- Author:
- Thomas Down, Matthew Pocock, Simon Foote, Len Trigg, Mark Schreiber, Richard Holland
-
Field Summary
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES -
Constructor Summary
ConstructorsConstructorDescriptionBioSQLSequenceDB(String dbURL, String dbUser, String dbPass, String biodatabase, boolean create) Deprecated.Connect to a BioSQL database.BioSQLSequenceDB(String dbDriver, String dbURL, String dbUser, String dbPass, String biodatabase, boolean create) Deprecated.Connect to a BioSQL database.BioSQLSequenceDB(DataSource ds, String biodatabase, boolean create) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionaddOntology(Ontology onto) Deprecated.voidaddSequence(Sequence seq) Deprecated.Adds a sequence to the database.voidcreateDummySequence(String id, Alphabet alphabet, int length) Deprecated.createOntology(String name, String description) Deprecated.filter(FeatureFilter ff) Deprecated.Query features attached to all sequences in this database.getName()Deprecated.Get the name of this sequence database.getOntology(String name) Deprecated.getSequence(int bioentry_id) Deprecated.getSequence(String id) Deprecated.Retrieve a single sequence by its id.ids()Deprecated.Get an immutable set of all of the IDs in the database.voidremoveSequence(String id) Deprecated.Remove the sequence associated with an ID from the database.Deprecated.Returns a SequenceIterator over all sequences in the database.Methods 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
-
BioSQLSequenceDB
public BioSQLSequenceDB(String dbDriver, String dbURL, String dbUser, String dbPass, String biodatabase, boolean create) throws BioException Deprecated.Connect to a BioSQL database.- Parameters:
dbDriver- A JDBC database driver. For example,com.jdbc.mysql.DriverdbURL- A JDBC database URL. For example,jdbc:postgresql://localhost/thomasd_biosqldbUser- The username to use when connecting to the database (or an empty string).dbPass- The password to use when connecting to the database (or an empty string).biodatabase- The identifier of a namespace within the physical BioSQL database.create- If the requested namespace doesn't exist, and this flag istrue, a new namespace will be created.- Throws:
BioException- if an error occurs communicating with the database
-
BioSQLSequenceDB
public BioSQLSequenceDB(String dbURL, String dbUser, String dbPass, String biodatabase, boolean create) throws BioException Deprecated.Connect to a BioSQL database.- Parameters:
dbURL- A JDBC database URL. For example,jdbc:postgresql://localhost/thomasd_biosqldbUser- The username to use when connecting to the database (or an empty string).dbPass- The password to use when connecting to the database (or an empty string).biodatabase- The identifier of a namespace within the physical BioSQL database.create- If the requested namespace doesn't exist, and this flag istrue, a new namespace will be created.- Throws:
BioException- if an error occurs communicating with the database
-
BioSQLSequenceDB
Deprecated.- Throws:
BioException
-
-
Method Details
-
createOntology
Deprecated.- Throws:
Exception
-
getOntology
Deprecated.- Throws:
Exception
-
addOntology
Deprecated.- Throws:
Exception
-
getName
Deprecated.Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Specified by:
getNamein interfaceSequenceDBLite- Returns:
- the name of the sequence database, which may be null.
-
createDummySequence
public void createDummySequence(String id, Alphabet alphabet, int length) throws ChangeVetoException, BioException Deprecated.- Throws:
ChangeVetoExceptionBioException
-
addSequence
Deprecated.Description copied from interface:SequenceDBLiteAdds a sequence to the database.- Specified by:
addSequencein interfaceSequenceDBLite- Parameters:
seq- the Sequence to add- Throws:
ChangeVetoException- if either the database does not allow sequences to be added or the modification was vetoedIllegalIDException- if a uniqe ID could not be generated for seqBioException- if something goes wrong with adding the sequence
-
getSequence
Deprecated.Description copied from interface:SequenceDBLiteRetrieve a single sequence by its id.- Specified by:
getSequencein interfaceSequenceDBLite- Parameters:
id- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException- if there was a failure in retrieving the sequence
-
getSequence
Deprecated.- Throws:
BioException
-
removeSequence
Deprecated.Description copied from interface:SequenceDBLiteRemove the sequence associated with an ID from the database.- Specified by:
removeSequencein interfaceSequenceDBLite- Parameters:
id- the ID of the sequence to remove- Throws:
ChangeVetoException- if either the database does not allow sequences to be removed or the modification was vetoedIllegalIDException- if there is no sequence for the IDBioException- if something failed while removing the sequence for that ID
-
ids
Deprecated.Description copied from interface:SequenceDBGet an immutable set of all of the IDs in the database. The ids are legal arguments to getSequence.- Specified by:
idsin interfaceSequenceDB- Returns:
- a Set of ids - at the moment, strings
-
filter
Deprecated.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- Parameters:
ff- aFeatureFilter.
-
sequenceIterator
Deprecated.Description copied from interface:SequenceDBReturns a SequenceIterator over all sequences in the database. The order of retrieval is undefined.- Specified by:
sequenceIteratorin interfaceSequenceDB- Returns:
- a SequenceIterator over all sequences
-