Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public abstract class WebSequenceDB

extends AbstractChangeable
implements SequenceDBLite

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
`WebSequenceDB()`

Method Summary
`void` | `addSequence(Sequence seq)` Not supported, You can't add sequences to a WebDB!
`protected abstract URL` | `getAddress(String id)`
`protected abstract Alphabet` | `getAlphabet()`
`Sequence` | `getSequence(String id)` Gets a sequence using its unique ID (eg for GenBank this would be the GI number)
`protected abstract SequenceFormat` | `getSequenceFormat()`
`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.bio.seq.db.SequenceDBLite
`getName`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Constructor Detail

### WebSequenceDB

    public WebSequenceDB()

Method Detail

### getSequenceFormat

    protected abstract SequenceFormat getSequenceFormat()

### getAddress

    protected abstract URL getAddress(String id)
                               throws MalformedURLException

  Throws:
    `MalformedURLException`

### getAlphabet

    protected abstract Alphabet getAlphabet()

### getSequence

    public Sequence getSequence(String id)
                         throws BioException

  Gets a sequence using its unique ID (eg for GenBank this would be the GI number)

  Specified by:
    `getSequence` in interface `SequenceDBLite`
  Parameters:
    `id` - the unique ID
  Returns:
    the matching sequence
  Throws:
    `BioException` - if the ID is invalid
    `BioException` - if the io operation times out or has problems connecting. Can also indicate an invalid URL has been constructed.

### addSequence

    public void addSequence(Sequence seq)
                     throws ChangeVetoException

  Not supported, You can't add sequences to a WebDB!

  Specified by:
    `addSequence` in interface `SequenceDBLite`
  Parameters:
    `seq` - the sequence you tried to add
  Throws:
    `ChangeVetoException` - always!

### removeSequence

    public void removeSequence(String id)
                        throws ChangeVetoException

  Not supported, you can't remove a sequence from a WebDB!

  Specified by:
    `removeSequence` in interface `SequenceDBLite`
  Parameters:
    `id` - the sequence you tried to change.
  Throws:
    `ChangeVetoException` - always!

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD