org.biojava.directory
Interface RegistryConfiguration

All Known Implementing Classes:
RegistryConfiguration.Composite, RegistryConfiguration.Impl

public interface RegistryConfiguration

The BioDirectory Registry is a simple system for specifying where to find services which provide sequence databases. A client should look at the following places in order to find this file:

  $HOME/.bioinformatics/seqdatabase.ini
  /etc/bioinformatics/seqdatabase.ini
  http://www.open-bio.org/registry/seqdatabase.ini
 

The file is a simple stanza format

  [database-name]
  tag=value
  tag=value

  [database-name]
  tag=value
  tag=value
 

where each stanza starts with the declaration of the database being in square brackets and following that one line tag=value tag value formats.

Database-name stanzas can be repeated, in which case the client should try each service in turn (starting at the first one).

The options under each stanza must have two non-optional tag=value lines being

  protocol=<protocol-type>
  location=<location-string>
 

'protocol' currently can be one of

'location' is a string specific to the protocol. Any number of additional tag values are allowed in the stanza which should be passed to the appropiate constructor of the protocol to interpret. Some protocols might insist on other mandatory tags.

Version:
$Revision: 1.9 $
Author:
Brian Gilman, Keith James, Matthew Pocock

Nested Class Summary
static class RegistryConfiguration.Composite
          A RegistryConfiguration that allows you to treat other configurations as providing important or default configuration information.
static class RegistryConfiguration.Impl
          A simple implementation of RegistryConfiguration backed by a Map.
 
Method Summary
 java.lang.String getConfigLocator()
          getConfigLocator returns a locator for the configuration.
 java.util.Map getConfiguration()
          getConfiguration returns a mapping of registry database names to collections of tag-value pairs.
 

Method Detail

getConfiguration

java.util.Map getConfiguration()
                               throws RegistryException
getConfiguration returns a mapping of registry database names to collections of tag-value pairs.

Returns:
a Map.
Throws:
RegistryException - if an error occurs.

getConfigLocator

java.lang.String getConfigLocator()
getConfigLocator returns a locator for the configuration.

Returns:
a String.