Version: 1.1.1

org.biomoby.registry.meta
Class RegistriesList

java.lang.Object
  extended by org.biomoby.registry.meta.RegistriesList
All Implemented Interfaces:
Registries
Direct Known Subclasses:
ExampleList

public class RegistriesList
extends Object
implements Registries

A default implementation, providing a list of well-known BioMoby registries.

Please edit this file if you want to have your BioMoby registry visible to others (for example, in BioMoby Dashboard).

Or, you can also replace this implementation by your own, with your own list of registries.

Version:
$Id: RegistriesList.java,v 1.6 2009/12/01 16:05:11 kawas Exp $
Author:
Martin Senger

Field Summary
 
Fields inherited from interface org.biomoby.registry.meta.Registries
DEFAULT_REGISTRY_SYNONYM
 
Constructor Summary
RegistriesList()
          A default constructor.
RegistriesList(Registry[] additionalRegistries)
          A constructor that adds registries to the default list.
 
Method Summary
 Registry get(String synonym)
          Return an object with properties of a given BioMoby registry.
 Registry[] getAll()
          Return properties of all known BioMoby registries.
static Registries getInstance()
          Create a list of registries as dynamically found using the SPI mechanim.
 String[] list()
          Return a list of synonyms (abbreviations) of all known BioMoby registries.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistriesList

public RegistriesList()
A default constructor. It initialises the registry list from a here-hard-coded list.


RegistriesList

public RegistriesList(Registry[] additionalRegistries)
A constructor that adds registries to the default list.

Method Detail

getInstance

public static Registries getInstance()
Create a list of registries as dynamically found using the SPI mechanim. If the SPI does not find any class, it creates a default list.

Use this method if you want to add your own registry (or registries) without changing the existing jMoby Java code. This method is used by Dashboard - in its documenttaion is an example how to do it.

Returns:
an instance providing a list of known/available registries

list

public String[] list()
Description copied from interface: Registries
Return a list of synonyms (abbreviations) of all known BioMoby registries. It should always return at least a default synonym that represents a default BioMoby registry.

The returned synonyms can be used in the get method.

Specified by:
list in interface Registries
Returns:
always a non-empty array

get

public Registry get(String synonym)
             throws MobyException
Description copied from interface: Registries
Return an object with properties of a given BioMoby registry.

Specified by:
get in interface Registries
Parameters:
synonym - is the name (abbreviation) of a BioMoby registry whose properties shall be returned; it can be null - in which case properties of a default BioMoby registry are returned
Returns:
properties of the given registry
Throws:
MobyException - if the given 'synonym' does not represent any known registry

getAll

public Registry[] getAll()
Description copied from interface: Registries
Return properties of all known BioMoby registries. At least one registry (the default one) should be always included.

Specified by:
getAll in interface Registries
Returns:
always a non-empty array

Version: 1.1.1

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