u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_CAS_CONSUMER);
u.setInstanceName(p.getName());
u.configParamDecls = p.getConfigurationParameterDeclarations();
u.configParamSettings = p.getConfigurationParameterSettings();
} else if (xmlizable instanceof URISpecifier) {
URISpecifier specifier = (URISpecifier) xmlizable;
// Trace.err("URISpecifier protocol=" + specifier.getProtocol()
// + " resource type=" + specifier.getResourceType()
// + " uri=" + specifier.getUri());
u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_SERVICE);
// Create a name from URI
String name = "Unknow";
try {
name = new URI(specifier.getUri()).getPath();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
u.setInstanceName(name);
} else if (xmlizable instanceof CustomResourceSpecifier) {
CustomResourceSpecifier specifier = (CustomResourceSpecifier) xmlizable;
// Parameter[] params = specifier.getParameters();
// Trace.err("CustomResourceSpecifier ResourceClassname=" + specifier.getResourceClassName()
// + " Parameter size=" + params.length);
// for (int i=0; i<params.length; ++i) {
// Trace.err("Param name: " + params[i].getName() +
// " value: " + params[i].getValue());
// }
u.setCasProcessorCategory(UimaCasProcessor.CASPROCESSOR_CAT_CUSTOM_RESOURCE_SPECIFIER);
// Create a name from ResourceClassName
u.setInstanceName(specifier.getResourceClassName());
}
u.configParamsModel = new ConfigParametersModel(u.configParamDecls, u.configParamSettings,
cpeCasProcessor.getConfigurationParameterSettings());
createConfigParamOverrides(u.configParamsModel);