Package org.biojava.bio.seq.db
Class DummySequenceDBInstallation
java.lang.Object
org.biojava.bio.seq.db.DummySequenceDBInstallation
- All Implemented Interfaces:
SequenceDBInstallation
DummySequenceDBInstallation
is an implementation which
returns the same DummySequenceDB
instance regardless
of the identifier used to retrieve a database.- Since:
- 1.2
- Author:
- Keith James
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSequenceDB
(SequenceDBLite sequenceDB, Set otherIdentifiers) As this is a dummy implementation adding a sequenceDB doesn't do anythinggetSequenceDB
(String identifier) Return the SequenceDB for the given identifier.Return all sequence dbs available in this sequence db installation.
-
Constructor Details
-
DummySequenceDBInstallation
public DummySequenceDBInstallation()
-
-
Method Details
-
getSequenceDB
Description copied from interface:SequenceDBInstallation
Return the SequenceDB for the given identifier. The identifier can (but need not) be the name of the sequence db. An implementation may support any number of identifiers to (uniquely) identify a particular sequence db - but the name of the sequence db (returned by SequenceDB.getName()) must always be among them.
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.
- Specified by:
getSequenceDB
in interfaceSequenceDBInstallation
- Parameters:
identifier
- the string that identifies the sequence db. May not be null.- Returns:
- the SequenceDB object that matches the given identifier or null if no such SequenceDB object could be found. (It is the responsibility of the implementation to take care that all identifiers are unique so if it turns out that the given identifier identifies more than one sequence db, this method should throw a RuntimeException.)
-
getSequenceDBs
Description copied from interface:SequenceDBInstallation
Return all sequence dbs available in this sequence db installation. This is not just the set of sequence dbs already returned by getSequenceDB() but the entire set of sequence dbs supported by this object.- Specified by:
getSequenceDBs
in interfaceSequenceDBInstallation
- Returns:
- a set of SequenceDB objects which may be empty. An implementation may also return null if it is not at all possible to determine which sequence dbs are part of this installation.
-
addSequenceDB
As this is a dummy implementation adding a sequenceDB doesn't do anything- Specified by:
addSequenceDB
in interfaceSequenceDBInstallation
- Parameters:
sequenceDB
- aSequenceDB
.otherIdentifiers
- aSet
.
-