## org.biojava.bio.program.das
Class DASSequenceDB

    java.lang.Object
      org.biojava.utils.Unchangeable
          org.biojava.bio.program.das.DASSequenceDB

All Implemented Interfaces:
  SequenceDB, SequenceDBLite, Changeable

    public class DASSequenceDB

extends Unchangeable
implements SequenceDB

Collection of sequences retrieved from the DAS network.

The DAS-specific parts of this API are still subject to change.

Since:
  1.1
Author:
  Thomas Down

Field Summary

Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
`SEQUENCES`

Constructor Summary
`DASSequenceDB(URL dataSourceURL)`

Method Summary
`void` `addSequence(Sequence seq)` Adds a sequence to the database.
`SequenceDBLite` `allEntryPointsDB()`
`FeatureHolder` `filter(FeatureFilter ff)` Query features attached to all sequences in this database.
`String` `getName()` Get the name of this sequence database.
`Sequence` `getSequence(String id)` Retrieve a single sequence by its id.
`URL` `getURL()` Return the URL of the reference server for this database.
`Set` `ids()` Get an immutable set of all of the IDs in the database.
`void` `removeSequence(String id)` Remove the sequence associated with an ID from the database.
`SequenceIterator` `sequenceIterator()` Returns a SequenceIterator over all sequences in the database.

Methods inherited from class org.biojava.utils.Unchangeable
`addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarder`

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

### DASSequenceDB

    public DASSequenceDB(URL dataSourceURL)
                  throws BioException

Throws:
  `BioException`

Method Detail

### filter

    public FeatureHolder filter(FeatureFilter ff)

  Description copied from interface: `SequenceDB`
  Query features attached to all sequences in this database. This is equivalent to applying `filter` to all sequences then merging the results.

  Specified by:
    `filter` in interface `SequenceDB`
  Parameters:
    `ff` - a `FeatureFilter`.

### allEntryPointsDB

    public SequenceDBLite allEntryPointsDB()

### getURL

    public URL getURL()

  Return the URL of the reference server for this database.

### getName

    public String getName()

  Description copied from interface: `SequenceDBLite`
  Get the name of this sequence database.

  Specified by:
    `getName` in interface `SequenceDBLite`
  Returns:
    the name of the sequence database, which may be null.

### getSequence

    public Sequence getSequence(String id)
                         throws BioException,
                                IllegalIDException

  Description copied from interface: `SequenceDBLite`
  Retrieve a single sequence by its id.

  Specified by:
    `getSequence` in interface `SequenceDBLite`
  Parameters:
    `id` - the id to retrieve by
  Returns:
    the Sequence with that id
  Throws:
    `IllegalIDException` - if the database doesn't know about the id
    `BioException` - if there was a failure in retrieving the sequence

### ids

    public Set ids()

  Description copied from interface: `SequenceDB`
  Get an immutable set of all of the IDs in the database. The ids are legal arguments to getSequence.

  Specified by:
    `ids` in interface `SequenceDB`
  Returns:
    a Set of ids - at the moment, strings

### addSequence

    public void addSequence(Sequence seq)
                     throws ChangeVetoException

  Description copied from interface: `SequenceDBLite`
  Adds a sequence to the database.

  Specified by:
    `addSequence` in interface `SequenceDBLite`
  Parameters:
    `seq` - the Sequence to add
  Throws:
    `ChangeVetoException` - if either the database does not allow sequences to be added or the modification was vetoed

### removeSequence

    public void removeSequence(String id)
                        throws ChangeVetoException

  Description copied from interface: `SequenceDBLite`
  Remove the sequence associated with an ID from the database.

  Specified by:
    `removeSequence` in interface `SequenceDBLite`
  Parameters:
    `id` - the ID of the sequence to remove
  Throws:
    `ChangeVetoException` - if either the database does not allow sequences to be removed or the modification was vetoed

### sequenceIterator

    public SequenceIterator sequenceIterator()

  Description copied from interface: `SequenceDB`
  Returns a SequenceIterator over all sequences in the database. The order of retrieval is undefined.

  Specified by:
    `sequenceIterator` in interface `SequenceDB`
  Returns:
    a SequenceIterator over all sequences