Package org.biojava.bio.program.das
Class ReferenceServer
- java.lang.Object
-
- org.biojava.bio.program.das.DataSource
-
- org.biojava.bio.program.das.ReferenceServer
-
- All Implemented Interfaces:
Changeable
public class ReferenceServer extends DataSource implements Changeable
Reflects a reference server on the DAS network.- Author:
- Matthew Pocock, Thomas Down
-
-
Field Summary
Fields Modifier and Type Field Description static ChangeType
ANNOTATOR
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChangeListener(ChangeListener cl)
Add a listener that will be informed of all changes.void
addChangeListener(ChangeListener cl, ChangeType ct)
Add a listener that will be informed of changes of a given type.java.util.Set
getAnnotaters()
protected ChangeSupport
getChangeSupport(ChangeType ct)
SequenceDB
getDB()
DistDataSource
getDistDataSource()
protected boolean
hasListeners()
boolean
isUnchanging(ChangeType ct)
A particular ChangeType can never be raised by this Changeable.void
removeChangeListener(ChangeListener cl)
Remove a listener that was interested in all types of changes.void
removeChangeListener(ChangeListener cl, ChangeType ct)
Remove a listener that was interested in a specific types of changes.-
Methods inherited from class org.biojava.bio.program.das.DataSource
equals, getDescription, getMapURL, getName, getURL, hashCode
-
-
-
-
Field Detail
-
ANNOTATOR
public static final ChangeType ANNOTATOR
-
-
Method Detail
-
hasListeners
protected boolean hasListeners()
-
getChangeSupport
protected ChangeSupport getChangeSupport(ChangeType ct)
-
addChangeListener
public final void addChangeListener(ChangeListener cl)
Description copied from interface:Changeable
Add a listener that will be informed of all changes.- Specified by:
addChangeListener
in interfaceChangeable
- Parameters:
cl
- the ChangeListener to add
-
addChangeListener
public final void addChangeListener(ChangeListener cl, ChangeType ct)
Description copied from interface:Changeable
Add a listener that will be informed of changes of a given type.- Specified by:
addChangeListener
in interfaceChangeable
- Parameters:
cl
- the ChangeListenerct
- the ChangeType it is to be informed of
-
removeChangeListener
public final void removeChangeListener(ChangeListener cl)
Description copied from interface:Changeable
Remove a listener that was interested in all types of changes.- Specified by:
removeChangeListener
in interfaceChangeable
- Parameters:
cl
- a ChangeListener to remove
-
removeChangeListener
public final void removeChangeListener(ChangeListener cl, ChangeType ct)
Description copied from interface:Changeable
Remove a listener that was interested in a specific types of changes.- Specified by:
removeChangeListener
in interfaceChangeable
- Parameters:
cl
- a ChangeListener to removect
- the ChangeType that it was interested in
-
isUnchanging
public final boolean isUnchanging(ChangeType ct)
Description copied from interface:Changeable
A particular ChangeType can never be raised by this Changeable.
If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.
- Specified by:
isUnchanging
in interfaceChangeable
- Parameters:
ct
- the ChangeType to check- Returns:
- true if ChangeEvents of this type are guaranteed to never be fired
-
getAnnotaters
public java.util.Set getAnnotaters()
-
getDB
public SequenceDB getDB() throws BioException
- Throws:
BioException
-
getDistDataSource
public DistDataSource getDistDataSource() throws BioException
- Overrides:
getDistDataSource
in classDataSource
- Throws:
BioException
-
-