Package org.apache.uima.resource
Class ConfigurableResource_ImplBase
java.lang.Object
org.apache.uima.resource.Resource_ImplBase
org.apache.uima.resource.ConfigurableResource_ImplBase
- All Implemented Interfaces:
ConfigurableResource,Resource
- Direct Known Subclasses:
AnalysisEngineImplBase,CasConsumer_ImplBase,CasDataCollectionReader_ImplBase,CasDataConsumer_ImplBase,CasDataInitializer_ImplBase,CasInitializer_ImplBase,CollectionReader_ImplBase,FlowControllerContainer
public abstract class ConfigurableResource_ImplBase
extends Resource_ImplBase
implements ConfigurableResource
Implementation base class for
ConfigurableResources. Provides access to configuration
parameters as well as basic reconfiguration capability. Subclasses should override the
initialize and reconfigure methods to read specific configuration
parameters (after calling super.initialize or super.reconfigure).-
Field Summary
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfigParameterValue(String aParamName) Looks up the value of a configuration parameter.getConfigParameterValue(String aGroupName, String aParamName) Looks up the value of a configuration parameter in a group.voidInstructs this Resource to re-read its configuration parameter settings.voidsetConfigParameterValue(String aParamName, Object aValue) Sets the value of a configuration parameter.voidsetConfigParameterValue(String aGroupName, String aParamName, Object aValue) Sets the value of a configuration parameter in a group.Methods inherited from class org.apache.uima.resource.Resource_ImplBase
destroy, getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, loadUserClass, loadUserClassOrThrow, setContextHolder, setContextHolderX, setLogger, setMetaData, withContextHolderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.uima.resource.Resource
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
-
Constructor Details
-
ConfigurableResource_ImplBase
public ConfigurableResource_ImplBase()
-
-
Method Details
-
getConfigParameterValue
Description copied from interface:ConfigurableResourceLooks up the value of a configuration parameter. This method will only return the value of a parameter that is not defined in any group.This method returns
nullif the parameter is optional and has not been assigned a value. (For mandatory parameters, an exception is thrown during initialization if no value has been assigned.) This method also returnsnullif there is no declared configuration parameter with the specified name.- Specified by:
getConfigParameterValuein interfaceConfigurableResource- Parameters:
aParamName- the name of a parameter that is not in any group- Returns:
- the value of the parameter with name
aParamName,nullis either the parameter does not exist or it has not been assigned a value. - See Also:
-
getConfigParameterValue
Description copied from interface:ConfigurableResourceLooks up the value of a configuration parameter in a group. If the parameter has no value assigned within the group, fallback strategies will be followed.This method returns
nullif the parameter is optional and has not been assigned a value. (For mandatory parameters, an exception is thrown during initialization if no value has been assigned.) This method also returnsnullif there is no declared configuration parameter with the specified name.- Specified by:
getConfigParameterValuein interfaceConfigurableResource- Parameters:
aGroupName- the name of a configuration group. If the group name isnull, this method will return the same value asgetParameterValue(String).aParamName- the name of a parameter in the group- Returns:
- the value of the parameter in group
aGroupNamewith nameaParamName,,nullis either the parameter does not exist or it has not been assigned a value. - See Also:
-
setConfigParameterValue
Description copied from interface:ConfigurableResourceSets the value of a configuration parameter. This only works for a parameter that is not defined in any group. Note that there is no guarantee that the change will take effect untilConfigurableResource.reconfigure()is called.- Specified by:
setConfigParameterValuein interfaceConfigurableResource- Parameters:
aParamName- the name of a parameter that is not in any groupaValue- the value to assign to the parameter- See Also:
-
setConfigParameterValue
Description copied from interface:ConfigurableResourceSets the value of a configuration parameter in a group. Note that there is no guarantee that the change will take effect untilConfigurableResource.reconfigure()is called.- Specified by:
setConfigParameterValuein interfaceConfigurableResource- Parameters:
aGroupName- the name of a configuration group. If this parameter isnull, this method will have the same effect assetParameterValue(String,Object).aParamName- the name of a parameter in the groupaValue- the value to assign to the parameter.- See Also:
-
reconfigure
Description copied from interface:ConfigurableResourceInstructs this Resource to re-read its configuration parameter settings.- Specified by:
reconfigurein interfaceConfigurableResource- Throws:
ResourceConfigurationException- if the configuration is not valid- See Also:
-