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 TypeMethodDescriptionvoid
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.getConfigLocator
returns a locator for the configuration.getConfiguration
returns a mapping of registry database names to collections of tag-value pairs.
-
Constructor Details
-
Composite
public Composite()
-
-
Method Details
-
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
Description copied from interface:RegistryConfiguration
getConfigLocator
returns a locator for the configuration.- Specified by:
getConfigLocator
in 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
-