public class BioSQLSequenceDB extends AbstractChangeable implements SequenceDB
SEQUENCES
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
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.Driver
dbURL
- A JDBC database URL. For example, jdbc:postgresql://localhost/thomasd_biosql
dbUser
- 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 databasepublic BioSQLSequenceDB(String dbURL, String dbUser, String dbPass, String biodatabase, boolean create) throws BioException
dbURL
- A JDBC database URL. For example, jdbc:postgresql://localhost/thomasd_biosql
dbUser
- 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 databasepublic BioSQLSequenceDB(DataSource ds, String biodatabase, boolean create) throws BioException
BioException
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
Exception
public 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 SequenceDBLite
seq
- the Sequence to addChangeVetoException
- 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 sequencepublic Sequence getSequence(String id) throws BioException
SequenceDBLite
getSequence
in interface SequenceDBLite
id
- the id to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
- if there was a failure in retrieving the sequencepublic Sequence getSequence(int bioentry_id) throws BioException
BioException
public void removeSequence(String id) throws ChangeVetoException, BioException
SequenceDBLite
removeSequence
in interface SequenceDBLite
id
- the ID of the sequence to removeChangeVetoException
- 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 IDpublic Set ids()
SequenceDB
ids
in interface SequenceDB
public FeatureHolder filter(FeatureFilter ff)
SequenceDB
filter
to all
sequences then merging the results.filter
in interface SequenceDB
ff
- a FeatureFilter
.public SequenceIterator sequenceIterator()
SequenceDB
sequenceIterator
in interface SequenceDB
Copyright © 2014 BioJava. All rights reserved.