Version: 1.1.1

org.inb.biomoby.central.model
Class NamespacesModel

java.lang.Object
  extended by org.inb.biomoby.central.model.AbstractModel<Namespace>
      extended by org.inb.biomoby.central.model.NamespacesModel
All Implemented Interfaces:
Runnable, ModelListener<MobyCentral>

public class NamespacesModel
extends AbstractModel<Namespace>
implements ModelListener<MobyCentral>, Runnable

BioMoby namespaces model implementation class.

Author:
Dmitry Repchevsky

Method Summary
 boolean addElement(Namespace element)
          Method not implemented and throws an exeption
 Namespace get(String namespace)
          Method to find a BioMoby namespace object by its name
 List<Namespace> getElements()
          Method to get all namespaces from the model.
static NamespacesModel instance()
          A singleton model creation method.
 void modelCleared()
          An observer method that starts a model reloading once the default BioMoby Registry model has been changed
 void modelObjectChanged(MobyCentral mobyCentral1, MobyCentral mobyCentral2)
           
 void modelObjectInserted(MobyCentral mobyCentral)
           
 void modelObjectRemoved(MobyCentral mobyCentral)
           
 void reload()
          Method to reload the model from a BioMoby Registry (also updating a cache)
 boolean removeElement(Namespace element)
          Method to unregister a namespace from a BioMoby Registry.
 void run()
           
 void setCentral(MobyCentral central)
          Even the method declared public it is recommended to set BioMoby Registry globaly through a MobyCentralModel.
 boolean updateElement(Namespace element1, Namespace element2)
          A method that updates an element referred by element1 with data provided by element2.
 
Methods inherited from class org.inb.biomoby.central.model.AbstractModel
addListener, getElement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setCentral

public void setCentral(MobyCentral central)
Even the method declared public it is recommended to set BioMoby Registry globaly through a MobyCentralModel.

Parameters:
central - - BioMoby Registry to get the namespaces from

reload

public void reload()
Method to reload the model from a BioMoby Registry (also updating a cache)


get

public Namespace get(String namespace)
Method to find a BioMoby namespace object by its name

Parameters:
namespace - - a name of BioMoby namespace to be found
Returns:
- a found namespace or null

getElements

public List<Namespace> getElements()
Method to get all namespaces from the model.

Specified by:
getElements in class AbstractModel<Namespace>
Returns:
- a list of BioMoby namespaces

addElement

public boolean addElement(Namespace element)
Method not implemented and throws an exeption

Specified by:
addElement in class AbstractModel<Namespace>
Parameters:
element - - a new namespace to be registered with BioMoby Registry
Returns:
- true if operation succeed

removeElement

public boolean removeElement(Namespace element)
Method to unregister a namespace from a BioMoby Registry. Method is not implemented.

Specified by:
removeElement in class AbstractModel<Namespace>
Parameters:
element - - namespace to be unregistered
Returns:
- true if operation succeed

updateElement

public boolean updateElement(Namespace element1,
                             Namespace element2)
A method that updates an element referred by element1 with data provided by element2. Method is not implemented.

Specified by:
updateElement in class AbstractModel<Namespace>
Parameters:
element1 - - an namespace in a model to be updated
element2 - - an namespace that used as a data source to updated one
Returns:
- true if operation succeed

modelCleared

public void modelCleared()
An observer method that starts a model reloading once the default BioMoby Registry model has been changed

Specified by:
modelCleared in interface ModelListener<MobyCentral>

modelObjectInserted

public void modelObjectInserted(MobyCentral mobyCentral)
Specified by:
modelObjectInserted in interface ModelListener<MobyCentral>

modelObjectRemoved

public void modelObjectRemoved(MobyCentral mobyCentral)
Specified by:
modelObjectRemoved in interface ModelListener<MobyCentral>

modelObjectChanged

public void modelObjectChanged(MobyCentral mobyCentral1,
                               MobyCentral mobyCentral2)
Specified by:
modelObjectChanged in interface ModelListener<MobyCentral>

run

public void run()
Specified by:
run in interface Runnable

instance

public static NamespacesModel instance()
A singleton model creation method.

Returns:
- A NamespacesModel singleton

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010