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 TypeMethodDescriptionvoidaddSequence(Sequence seq) Not supported, You can't add sequences to a WebDB!protected abstract URLgetAddress(String id) protected abstract AlphabetgetSequence(String id) Gets a sequence using its unique ID (eg for GenBank this would be the GI number)protected abstract SequenceFormatvoidremoveSequence(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, 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, removeChangeListenerMethods 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:
getSequencein 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:
addSequencein 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:
removeSequencein interfaceSequenceDBLite- Parameters:
id- the sequence you tried to change.- Throws:
ChangeVetoException- always!
-