Package org.biojava.bio.seq.db
Class WebSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.WebSequenceDB
- All Implemented Interfaces:
SequenceDBLite
,Changeable
- Direct Known Subclasses:
NCBISequenceDB
Functions for access to a web based database that returns sequences
in a variety of formats.
- Author:
- Jason Stajich, Matthew Pocock, Mark Schreiber, Richard Holland
-
Field Summary
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSequence
(Sequence seq) Not supported, You can't add sequences to a WebDB!protected abstract URL
getAddress
(String id) protected abstract Alphabet
getSequence
(String id) Gets a sequence using its unique ID (eg for GenBank this would be the GI number)protected abstract SequenceFormat
void
removeSequence
(String id) Not supported, you can't remove a sequence from a WebDB!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
Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLite
getName
-
Constructor Details
-
WebSequenceDB
public WebSequenceDB()
-
-
Method Details
-
getSequenceFormat
-
getAddress
- Throws:
MalformedURLException
-
getAlphabet
-
getSequence
Gets a sequence using its unique ID (eg for GenBank this would be the GI number)- Specified by:
getSequence
in interfaceSequenceDBLite
- Parameters:
id
- the unique ID- Returns:
- the matching sequence
- Throws:
BioException
- if the ID is invalidBioException
- if the io operation times out or has problems connecting. Can also indicate an invalid URL has been constructed.
-
addSequence
Not supported, You can't add sequences to a WebDB!- Specified by:
addSequence
in interfaceSequenceDBLite
- Parameters:
seq
- the sequence you tried to add- Throws:
ChangeVetoException
- always!
-
removeSequence
Not supported, you can't remove a sequence from a WebDB!- Specified by:
removeSequence
in interfaceSequenceDBLite
- Parameters:
id
- the sequence you tried to change.- Throws:
ChangeVetoException
- always!
-