## org.biojavax.bio.db
Interface BioEntryDBLite

All Known Subinterfaces:
  BioEntryDB, RichSequenceDB, RichSequenceDBLite

All Known Implementing Classes:
  AbstractBioEntryDB, AbstractRichSequenceDB, BioSQLBioEntryDB, BioSQLRichSequenceDB, GenbankRichSequenceDB, GenpeptRichSequenceDB, HashBioEntryDB, HashRichSequenceDB

    public interface BioEntryDBLite

A database of BioEntrys. 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 BioEntry database contains a finite number of BioEntrys stored under unique keys.

Since:
  1.5
Author:
  Matthew Pocock, Gerald Loeffler, Thomas Down, Richard Holland

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

Method Summary
`void` `addBioEntry(BioEntry seq)` Adds a sequence to the database.
`BioEntry` `getBioEntry(String id)` Retrieve a single BioEntry by its id.
`BioEntryDB` `getBioEntrys(Set ids)` Retrieve multiple BioEntry by their ids.
`BioEntryDB` `getBioEntrys(Set ids, BioEntryDB db)` Retrieve multiple BioEntry into a specific sequence database.
`String` `getName()` Get the name of this sequence database.
`void` `removeBioEntry(String id)` Remove the BioEntry associated with an ID from the database.

Field Detail

### BIOENTRYS

    static final ChangeType BIOENTRYS

  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.

### getBioEntry

    BioEntry getBioEntry(String id)
                         throws IllegalIDException,
                                BioException

  Retrieve a single BioEntry by its id.

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

### getBioEntrys

    BioEntryDB getBioEntrys(Set ids)
                            throws BioException,
                                   IllegalIDException

  Retrieve multiple BioEntry by their ids.

  Parameters:
    `ids` - a set of ids to retrieve by
  Returns:
    the BioEntrys with those ids
  Throws:
    `IllegalIDException` - if the database doesn't know about the id
    `BioException`

### getBioEntrys

    BioEntryDB getBioEntrys(Set ids,
                            BioEntryDB db)
                            throws BioException,
                                   IllegalIDException

  Retrieve multiple BioEntry into a specific sequence database. If that database is null, a new HashBioEntryDB is used.

  Parameters:
    `ids` - a set of ids to retrieve by
    `db` - a database to load the seqs into
  Returns:
    the BioEntrys with that id
  Throws:
    `IllegalIDException` - if the database doesn't know about the id
    `BioException`

### addBioEntry

    void addBioEntry(BioEntry seq)
                     throws IllegalIDException,
                            BioException,
                            ChangeVetoException

  Adds a sequence to the database.

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

### removeBioEntry

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

  Remove the BioEntry associated with an ID from the database.

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