public class SimpleSequenceDBInstallation extends Object implements SequenceDBInstallation
Constructor and Description |
---|
SimpleSequenceDBInstallation()
create an initially empty SimpleSequenceDBInstallation
|
Modifier and Type | Method and Description |
---|---|
void |
addSequenceDB(SequenceDBLite sequenceDB,
Set otherIdentifiers)
addSequenceDB adds a new SequenceDB which will be
accessible via the name returned by its getName() method and
via all other given identifiers. |
void |
addSequenceDB(String name,
Set otherIdentifiers)
This method creates a new (and empty) HashSequenceDB with the
given name that will be accessible through this sequence db
installation through this name and all given other identifiers.
|
boolean |
equals(Object o) |
SequenceDBLite |
getSequenceDB(String identifier)
If the given identifier is known to this sequence db installation
because it has been used in a call to addSequenceDB(), then this
method returns the SequenceDB associated with this
identifier.
|
Set |
getSequenceDBs()
Return a newly created set of the SequenceDB objects that were
already created through method addSequenceDB().
|
int |
hashCode() |
static void |
main(String[] args)
Test this class
|
String |
toString() |
public SimpleSequenceDBInstallation()
public void addSequenceDB(String name, Set otherIdentifiers)
name
- the name of the SequenceDB to create. Not null. If
this name is already used by this sequence db installation, an
IllegalArgumentException is thrown.otherIdentifiers
- a set of String objects that also serve
as identifiers for the newly created SequenceDB object. This set
should not contain the name of the SequenceDB, but if if does, it
is just ignored because the name is an identifier by
definition. The parameter may be empty or the empty set, in which
case the name is the only identifier for the newly created
SequenceDB. If any of the given identifiers (including the name)
is already used by this SimpleSequenceDBInstallation, an
IllegalArgumentException is thrown.public void addSequenceDB(SequenceDBLite sequenceDB, Set otherIdentifiers)
addSequenceDB
adds a new SequenceDB which will be
accessible via the name returned by its getName() method and
via all other given identifiers.addSequenceDB
in interface SequenceDBInstallation
sequenceDB
- a SequenceDB
object to
add. Although a SequenceDB may normally have a null name this
is not acceptable when it is added to a
SimpleSequenceDBInstallation as the name is used as its primary
identifier. If the name is already used by this
SimpleSequenceDBInstallation, an IllegalArgumentException is
thrown.otherIdentifiers
- a Set
of String objects
that also serve as identifiers for the newly created
SequenceDB. This set should not contain the name of the
SequenceDB, but if if does, it is just ignored because the name
is an identifier by definition. The parameter may be empty or
the empty set, in which case the name is the only identifier
for the newly created SequenceDB. If any of the given
identifiers (including the name) is already used by this
sequence db installation, an IllegalArgumentException is
thrown.public Set getSequenceDBs()
getSequenceDBs
in interface SequenceDBInstallation
public SequenceDBLite getSequenceDB(String identifier)
getSequenceDB
in interface SequenceDBInstallation
identifier
- the string that identifies the sequence db. May
not be null.Copyright © 2014 BioJava. All rights reserved.