Package org.biojava.directory
Class RegistryConfiguration.Composite
- java.lang.Object
-
- org.biojava.directory.RegistryConfiguration.Composite
-
- All Implemented Interfaces:
RegistryConfiguration
- Enclosing interface:
- RegistryConfiguration
public static class RegistryConfiguration.Composite extends Object implements RegistryConfiguration
A RegistryConfiguration that allows you to treat other configurations as providing important or default configuration information.- Author:
- Matthew Pocock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.directory.RegistryConfiguration
RegistryConfiguration.Composite, RegistryConfiguration.Impl
-
-
Constructor Summary
Constructors Constructor Description Composite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBottomConfig(RegistryConfiguration newConfig)
Add a configuration as the most default place to look.void
addTopConfig(RegistryConfiguration newConfig)
Add a configuration as the most authoritative place to look.String
getConfigLocator()
getConfigLocator
returns a locator for the configuration.Map
getConfiguration()
getConfiguration
returns a mapping of registry database names to collections of tag-value pairs.
-
-
-
Constructor Detail
-
Composite
public Composite()
-
-
Method Detail
-
getConfiguration
public Map getConfiguration()
Description copied from interface:RegistryConfiguration
getConfiguration
returns a mapping of registry database names to collections of tag-value pairs.- Specified by:
getConfiguration
in interfaceRegistryConfiguration
- Returns:
- a
Map
.
-
getConfigLocator
public String getConfigLocator()
Description copied from interface:RegistryConfiguration
getConfigLocator
returns a locator for the configuration.- Specified by:
getConfigLocator
in interfaceRegistryConfiguration
- Returns:
- a
String
.
-
addTopConfig
public void addTopConfig(RegistryConfiguration newConfig) throws RegistryException
Add a configuration as the most authoritative place to look. During future lookups with this context, values in newConfig will take precedence over values in the previously existing configuration.- Parameters:
newConfig
- the RegistryConfiguration to add as most important- Throws:
RegistryException
-
addBottomConfig
public void addBottomConfig(RegistryConfiguration newConfig) throws RegistryException
Add a configuration as the most default place to look. During future lookups with this context, values in newConfig will be used as default values only if the lookup would return nothing in the previously existing configuration.- Parameters:
newConfig
- the RegistryConfiguration to add as the default- Throws:
RegistryException
-
-