SequenceDBLite (BioJava-1.5-beta API)
Keywords: org.biojava.bio.seq.db.SequenceDBLite interface

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
Interface SequenceDBLite

All Superinterfaces:
  Changeable

All Known Subinterfaces:
  RichSequenceDB, RichSequenceDBLite, SequenceDB

All Known Implementing Classes:
  AbstractRichSequenceDB, AbstractSequenceDB, AnnotatedSequenceDB, BioFetchSequenceDB, BioSQLRichSequenceDB, BioSQLSequenceDB, CachingSequenceDB, DASSequenceDB, DistributedSequenceDB, DummySequenceDB, FlatSequenceDB, GenbankRichSequenceDB, HashRichSequenceDB, HashSequenceDB, IndexedSequenceDB, NCBISequenceDB, SequenceDBWrapper, SubSequenceDB, ViewingSequenceDB, WebSequenceDB

    public interface SequenceDBLite

extends Changeable

A database of sequences. This may have several implementations with rich behaviour, but basically most of the time you will just use the interface methods to do stuff. A sequence database contains a finite number of sequences stored under unique keys.

Author:
  Matthew Pocock, Gerald Loeffler, Thomas Down

Field Summary
`static ChangeType` | `SEQUENCES` Signals that sequences are being added to or remove from the database.

Method Summary
`void` | `addSequence(Sequence seq)` Adds a sequence to the database.
`String` | `getName()` Get the name of this sequence database.
`Sequence` | `getSequence(String id)` Retrieve a single sequence by its id.
`void` | `removeSequence(String id)` Remove the sequence associated with an ID from the database.

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

Field Detail

### SEQUENCES

    static final ChangeType SEQUENCES

  Signals that sequences are being added to or remove from the database. The sequences being removed should be listed in the previous field by id, either as a single String, an array or a Set. The sequences being added should be listed in the change field as either an array Object[] { id, seq}, or a Map of id->seq.

Method Detail

### getName

    String getName()

  Get the name of this sequence database.

  Returns:
    the name of the sequence database, which may be null.

### getSequence

    Sequence getSequence(String id)
                         throws IllegalIDException,
                                BioException

  Retrieve a single sequence by its id.

  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

### addSequence

    void addSequence(Sequence seq)
                     throws IllegalIDException,
                            BioException,
                            ChangeVetoException

  Adds a sequence to the database.

  Parameters:
    `seq` - the Sequence to add
  Throws:
    `IllegalIDException` - if a uniqe ID could not be generated for seq
    `BioException` - if something goes wrong with adding the sequence
    `ChangeVetoException` - if either the database does not allow sequences to be added or the modification was vetoed

### removeSequence

    void removeSequence(String id)
                        throws IllegalIDException,
                               BioException,
                               ChangeVetoException

  Remove the sequence associated with an ID from the database.

  Parameters:
    `id` - the ID of the sequence to remove
  Throws:
    `IllegalIDException` - if there is no sequence for the ID
    `BioException` - if something failed while removing the sequence for that ID
    `ChangeVetoException` - if either the database does not allow sequences to be removed or the modification was vetoed

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