// create primitive TAE description
mTestDesc = new CasInitializerDescription_impl();
mTestDesc.setFrameworkImplementation(Constants.JAVA_FRAMEWORK_NAME);
mTestDesc.setImplementationName("org.apache.uima.examples.TestAnnotator");
ProcessingResourceMetaData md = mTestDesc.getCasInitializerMetaData();
md.setName("Test CAS Initializer");
md.setDescription("Does not do anything useful.");
md.setVersion("1.0");
md.setTypeSystem(typeSystem);
md.setTypePriorities(typePriorities);
md.setFsIndexes(new FsIndexDescription[] { index, index2 });
Capability cap1 = new Capability_impl();
cap1.addInputType("Fake", false);
cap1.addInputFeature("TestFeature");
Capability cap2 = new Capability_impl();
cap2.addInputType("Fake", true);
cap1.setLanguagesSupported(new String[] { "en", "de" });
cap1.setMimeTypesSupported(new String[] { "text/plain" });
md.setCapabilities(new Capability[] { cap1, cap2 });
ConfigurationParameter cfgParam1 = new ConfigurationParameter_impl();
cfgParam1.setName("param1");
cfgParam1.setDescription("Test Parameter 1");
cfgParam1.setType("String");
ConfigurationParameter cfgParam2 = new ConfigurationParameter_impl();
cfgParam2.setName("param2");
cfgParam2.setDescription("Test Parameter 2");
cfgParam2.setType("Integer");
ConfigurationGroup cfgGrp1 = new ConfigurationGroup_impl();
cfgGrp1.setNames(new String[] { "cfgGrp1" });
cfgGrp1.setConfigurationParameters(new ConfigurationParameter[] { cfgParam1, cfgParam2 });
ConfigurationParameter cfgParam3 = new ConfigurationParameter_impl();
cfgParam3.setName("param3");
cfgParam3.setDescription("Test Parameter 3");
cfgParam3.setType("Float");
ConfigurationGroup cfgGrp2 = new ConfigurationGroup_impl();
cfgGrp2.setNames(new String[] { "cfgGrp2a", "cfgGrp2b" });
cfgGrp2.setConfigurationParameters(new ConfigurationParameter[] { cfgParam3 });
md.getConfigurationParameterDeclarations().setConfigurationGroups(
new ConfigurationGroup[] { cfgGrp1, cfgGrp2 });
NameValuePair nvp1 = new NameValuePair_impl("param1", "test");
NameValuePair nvp2 = new NameValuePair_impl("param2", Integer.valueOf("42"));
NameValuePair nvp3a = new NameValuePair_impl("param3", Float.valueOf("2.718281828459045"));
NameValuePair nvp3b = new NameValuePair_impl("param3", Float.valueOf("3.1415927"));
ConfigurationParameterSettings settings = md.getConfigurationParameterSettings();
settings.getSettingsForGroups().put("cfgGrp1", new NameValuePair[] { nvp1, nvp2 });
settings.getSettingsForGroups().put("cfgGrp2a", new NameValuePair[] { nvp3a });
settings.getSettingsForGroups().put("cfgGrp2b", new NameValuePair[] { nvp3b });
URISpecifier uriSpec = new URISpecifier_impl();