Package org.biojava.directory
Class RegistryConfiguration.Composite
java.lang.Object
org.biojava.directory.RegistryConfiguration.Composite
- All Implemented Interfaces:
RegistryConfiguration
- Enclosing interface:
- 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBottomConfig(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.getConfigLocatorreturns a locator for the configuration.getConfigurationreturns a mapping of registry database names to collections of tag-value pairs.
-
Constructor Details
-
Composite
public Composite()
-
-
Method Details
-
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
Description copied from interface:RegistryConfigurationgetConfigLocatorreturns a locator for the configuration.- Specified by:
getConfigLocatorin interfaceRegistryConfiguration- Returns:
- a
String.
-
addTopConfig
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
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
-