* @see org.apache.uima.resource.ConfigurationManager#getCurrentConfigParameterSettings(java.lang.String,
* org.apache.uima.resource.metadata.ConfigurationParameterDeclarations)
*/
public ConfigurationParameterSettings getCurrentConfigParameterSettings(String aContextName) {
// get declarations
ConfigurationParameterDeclarations decls = (ConfigurationParameterDeclarations) mContextNameToParamDeclsMap
.get(aContextName);
ConfigurationParameterSettings settings = UIMAFramework.getResourceSpecifierFactory()
.createConfigurationParameterSettings();
ConfigurationParameter[] paramsInNoGroup = decls.getConfigurationParameters();
if (paramsInNoGroup.length > 0) // no groups declared
{
settings.setParameterSettings(getParamSettings(null, paramsInNoGroup, aContextName));
} else
// groups declared
{
ConfigurationGroup[] groups = decls.getConfigurationGroups();
if (groups != null) {
for (int i = 0; i < groups.length; i++) {
String[] names = groups[i].getNames();
{
for (int j = 0; j < names.length; j++) {
// common params
NameValuePair[] commonParamSettings = getParamSettings(names[j], decls
.getCommonParameters(), aContextName);
NameValuePair[] specificParamSettings = getParamSettings(names[j], groups[i]
.getConfigurationParameters(), aContextName);
NameValuePair[] mergedSettings = new NameValuePair[commonParamSettings.length
+ specificParamSettings.length];