|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.biosql.BioSQLSequenceDB
public class BioSQLSequenceDB
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.
| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite |
|---|
SEQUENCES |
| Constructor Summary | |
|---|---|
BioSQLSequenceDB(DataSource ds,
String biodatabase,
boolean create)
Deprecated. |
|
BioSQLSequenceDB(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. |
|
| Method Summary | |
|---|---|
Ontology |
addOntology(Ontology onto)
Deprecated. |
void |
addSequence(Sequence seq)
Deprecated. Adds a sequence to the database. |
void |
createDummySequence(String id,
Alphabet alphabet,
int length)
Deprecated. |
Ontology |
createOntology(String name,
String description)
Deprecated. |
FeatureHolder |
filter(FeatureFilter ff)
Deprecated. Query features attached to all sequences in this database. |
String |
getName()
Deprecated. Get the name of this sequence database. |
Ontology |
getOntology(String name)
Deprecated. |
Sequence |
getSequence(int bioentry_id)
Deprecated. |
Sequence |
getSequence(String id)
Deprecated. Retrieve a single sequence by its id. |
Set |
ids()
Deprecated. Get an immutable set of all of the IDs in the database. |
void |
removeSequence(String id)
Deprecated. Remove the sequence associated with an ID from the database. |
SequenceIterator |
sequenceIterator()
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, 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 |
|---|
public BioSQLSequenceDB(String dbDriver,
String dbURL,
String dbUser,
String dbPass,
String biodatabase,
boolean create)
throws BioException
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 is true,
a new namespace will be created.
BioException - if an error occurs communicating with the database
public BioSQLSequenceDB(String dbURL,
String dbUser,
String dbPass,
String biodatabase,
boolean create)
throws BioException
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 is true,
a new namespace will be created.
BioException - if an error occurs communicating with the database
public BioSQLSequenceDB(DataSource ds,
String biodatabase,
boolean create)
throws BioException
BioException| Method Detail |
|---|
public Ontology createOntology(String name,
String description)
throws Exception
Exception
public Ontology getOntology(String name)
throws Exception
Exception
public Ontology addOntology(Ontology onto)
throws Exception
Exceptionpublic String getName()
SequenceDBLite
getName in interface SequenceDBLite
public void createDummySequence(String id,
Alphabet alphabet,
int length)
throws ChangeVetoException,
BioException
ChangeVetoException
BioException
public void addSequence(Sequence seq)
throws ChangeVetoException,
BioException
SequenceDBLite
addSequence in interface SequenceDBLiteseq - the Sequence to add
ChangeVetoException - if either the database does not allow
sequences to be added or the modification was vetoed
IllegalIDException - if a uniqe ID could not be generated for seq
BioException - if something goes wrong with adding the sequence
public Sequence getSequence(String id)
throws BioException
SequenceDBLite
getSequence in interface SequenceDBLiteid - the id to retrieve by
IllegalIDException - if the database doesn't know about the id
BioException - if there was a failure in retrieving the sequence
public Sequence getSequence(int bioentry_id)
throws BioException
BioException
public void removeSequence(String id)
throws ChangeVetoException,
BioException
SequenceDBLite
removeSequence in interface SequenceDBLiteid - the ID of the sequence to remove
ChangeVetoException - if either the database does not allow
sequences to be removed or the modification was vetoed
IllegalIDException - if there is no sequence for the ID
BioException - if something failed while removing the sequence for
that IDpublic Set ids()
SequenceDB
ids in interface SequenceDBpublic FeatureHolder filter(FeatureFilter ff)
SequenceDBfilter to all
sequences then merging the results.
filter in interface SequenceDBff - a FeatureFilter.public SequenceIterator sequenceIterator()
SequenceDB
sequenceIterator in interface SequenceDB
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||