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 voidaddBottomConfig(RegistryConfiguration newConfig)Add a configuration as the most default place to look.voidaddTopConfig(RegistryConfiguration newConfig)Add a configuration as the most authoritative place to look.StringgetConfigLocator()getConfigLocatorreturns a locator for the configuration.MapgetConfiguration()getConfigurationreturns 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:RegistryConfigurationgetConfigurationreturns a mapping of registry database names to collections of tag-value pairs.- Specified by:
getConfigurationin interfaceRegistryConfiguration- Returns:
- a
Map.
-
getConfigLocator
public String getConfigLocator()
Description copied from interface:RegistryConfigurationgetConfigLocatorreturns a locator for the configuration.- Specified by:
getConfigLocatorin 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
-
-