|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConfigurationParameterDeclarations
The declarations of configuration parameters in a Resource. A Resource can either declare a
single list of ConfigurationParameters or a list of ConfigurationGroups, where
each group can contain a list of parameters. When groups are used, the Resource can also declare
a list of common parameters shared by all groups.
| Field Summary | |
|---|---|
static String |
SEARCH_STRATEGY_DEFAULT_FALLBACK
A value for the searchStrategy property indicating that if there is no value
declared in a group, look in the default group. |
static String |
SEARCH_STRATEGY_LANGUAGE_FALLBACK
A value for the searchStrategy property that is useful when ISO language and
country codes are used as configuration group names. |
static String |
SEARCH_STRATEGY_NONE
A value for the searchStrategy property indicating that there is no fallback. |
| Method Summary | |
|---|---|
void |
addCommonParameter(ConfigurationParameter aConfigurationParameter)
Adds a Configuration Parameter that is common to all groups. |
void |
addConfigurationGroup(ConfigurationGroup aConfigurationGroup)
Adds a Configuration Group. |
void |
addConfigurationParameter(ConfigurationParameter aConfigurationParameter)
Adds a Configuration Parameter that is not in any group. |
ConfigurationParameter[] |
getCommonParameters()
Gets the configuration parameters that are common to all groups. |
ConfigurationGroup[] |
getConfigurationGroupDeclarations(String aGroupName)
Gets the declarations of a named configuration group. |
ConfigurationGroup[] |
getConfigurationGroups()
Gets the configuration parameter groups for this Resource. |
ConfigurationParameter |
getConfigurationParameter(String aGroupName,
String aParamName)
Gets a configuration parameter. |
ConfigurationParameter[] |
getConfigurationParameters()
Gets the configuration parameters for this Resource. |
String |
getDefaultGroupName()
Gets the name of the default configuration group. |
String |
getSearchStrategy()
Gets the configuration parameter search strategy. |
void |
removeCommonParameter(ConfigurationParameter aConfigurationParameter)
Removes an Configuration Parameter that is common to all groups. |
void |
removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)
Removes an Configuration Group |
void |
removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)
Removes an Configuration Parameter that is not in any group. |
void |
setCommonParameters(ConfigurationParameter[] aParams)
Sets the configuration parameters that are common to all groups. |
void |
setConfigurationGroups(ConfigurationGroup[] aGroups)
Sets the configuration parameter groups for this Resource. |
void |
setConfigurationParameters(ConfigurationParameter[] aParams)
Sets the configuration parameters for this Resource. |
void |
setDefaultGroupName(String aGroupName)
Sets the name of the default configuration group. |
void |
setSearchStrategy(String aStrategy)
Sets the configuration parameter search strategy. |
| Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject |
|---|
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl |
| Methods inherited from interface org.apache.uima.util.XMLizable |
|---|
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML |
| Field Detail |
|---|
static final String SEARCH_STRATEGY_NONE
searchStrategy property indicating that there is no fallback. If
a request is made for the value of a parameter in a group and there is no such value in that
exact group, null will be returned.
static final String SEARCH_STRATEGY_DEFAULT_FALLBACK
searchStrategy property indicating that if there is no value
declared in a group, look in the default group.
static final String SEARCH_STRATEGY_LANGUAGE_FALLBACK
searchStrategy property that is useful when ISO language and
country codes are used as configuration group names. If there is no value declared in a group,
look in more general groups. The fallback seqauence is
lang-country-region -> lang-country ->
lang -> default. For example, if a
request is made for the value of a parameter in the "en-GB" group and no such group exists, the
value from the "en" group will be used instead.
| Method Detail |
|---|
ConfigurationParameter[] getConfigurationParameters()
getConfigurationGroups().
ConfigurationParameter objects, each of which describes a
configuration parameter for this Resource.void setConfigurationParameters(ConfigurationParameter[] aParams)
setConfigurationGroups(ConfigurationGroup[]).
aParams - an array containing ConfigurationParameter objects, each of which describes a
configuration parameter for this Resource.
UIMA_UnsupportedOperationException - if this object is not modifiablevoid addConfigurationParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter - the Configuration Parameter to add
UIMA_UnsupportedOperationException - if this object is not modifiablevoid removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter - the Configuration Parameter to remove (must be == with an ConfigurationParameter in
this collection, or this method will do nothing).
UIMA_UnsupportedOperationException - if this object is not modifiableConfigurationGroup[] getConfigurationGroups()
ConfigurationGroup objects, each of which describes a
configuration parameter group for this Resource.void setConfigurationGroups(ConfigurationGroup[] aGroups)
aGroups - an array containing ConfigurationGroup objects, each of which describes a
configuration parameter group for this Resource.
UIMA_UnsupportedOperationException - if this object is not modifiablevoid addConfigurationGroup(ConfigurationGroup aConfigurationGroup)
aConfigurationGroup - the Configuration Group to add
UIMA_UnsupportedOperationException - if this object is not modifiablevoid removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)
aConfigurationGroup - the Configuration Group to remove (must be == with an ConfigurationGroup defined on
this resource, or this method will do nothing).
UIMA_UnsupportedOperationException - if this object is not modifiableConfigurationParameter[] getCommonParameters()
ConfigurationParameter objects, each of which describes a
parameter common to all groups.void setCommonParameters(ConfigurationParameter[] aParams)
aParams - an array containing ConfigurationParameter objects, each of which describes a
parameter common to all groups.void addCommonParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter - the Configuration Parameter to add
UIMA_UnsupportedOperationException - if this object is not modifiablevoid removeCommonParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter - the Configuration Parameter to remove (must be == with an ConfigurationParameter in
this collection, or this method will do nothing).
UIMA_UnsupportedOperationException - if this object is not modifiableString getDefaultGroupName()
configuration groups.
void setDefaultGroupName(String aGroupName)
configuration groups.
aGroupName - the name of the default configuration groupString getSearchStrategy()
void setSearchStrategy(String aStrategy)
aStrategy - the configuration parameter search strategy
ConfigurationParameter getConfigurationParameter(String aGroupName,
String aParamName)
aGroupName - the name of a group, or null for no groupaParamName - the name of the parameter
null if it does not existConfigurationGroup[] getConfigurationGroupDeclarations(String aGroupName)
aGroupName - the name of a group
aGroupName.
If there are no such groups, an empty array is returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||