|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A SequenceDBInstallation has the functionality of a factory for SequenceDB objects and additionally manages the SequenceDB objects created by itself such that the minimum number of SequenceDB objects is created by a particular SequenceDBInstallation object.
The idea behind this interface is that sequence databases are usually installed in groups. E.g., there might be a directory which contains FASTA-formated sequence files for EMBL and SwissProt; or there might be an SRS-installation that provides access to GenBank and SwissProt; or there might be a relational database that can be queried for GenBank, PIR and SwissProt entries. These 3 cases would be represented through 3 distinct SequenceDBInstallation objects. Each of these objects can be queried for the set of SequenceDB objects it supports, or a particular SequenceDB object can be retrieved from a SequenceDBInstallation object through a string identifier. All SequenceDB objects that belong to a particular SequenceDBInstallation share the same way of retrieving sequences and will hence be constructed and configured in a very similar fashion - which is the primary reason for inventing the SequenceDBInstallation object which can act as a factory for SequenceDB objects.
A SequenceDBInstallation object also manages the SequenceDB objects it has created so that requests for the same database (say SwissProt) will always return the same SequenceDB object. This becomes particularly important when SequenceDB objects allow the modification (create/update/delete of Sequence entries) of the underlying sequence database and this sequence "database" is not transactional in itself (such as a FASTA file). Because in this case the SequenceDB object must act as a transactional front-end to the sequence database and there should really be only one SequenceDB object for each sequence database - which is ensured by SequenceDBInstallation.
Method Summary | |
SequenceDB |
getSequenceDB(java.lang.String identifier)
return the SequenceDB for the given identifier. |
java.util.Set |
getSequenceDBs()
return all sequence dbs available in this sequence db installation. |
Method Detail |
public java.util.Set getSequenceDBs()
public SequenceDB getSequenceDB(java.lang.String identifier)
If the sequence db identified by the given identifier has not been requested through this object, it will be created and returned (hence this method is a factory method). If the sequence db identified by the given identifier has already been requested, the same object is returned.
identifier
- the string that identifies the sequence db. May not be null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |