}
mergeDelegateAnalysisEngineMetaData();
}
ProcessingResourceMetaData md = (ProcessingResourceMetaData) mDescription.getMetaData();
// resolve imports for primitives
if (mDescription instanceof AnalysisEngineDescription &&
((AnalysisEngineDescription)mDescription).isPrimitive()) {
try {
md.resolveImports();
} catch (InvalidXMLException e1) {
throw new ResourceInitializationException(e1);
}
}
super.initialize(aSpecifier, aAdditionalParams);
getLogger().logrb(Level.CONFIG, CLASS_NAME.getName(), "initialize", LOG_RESOURCE_BUNDLE,
"UIMA_analysis_engine_init_begin__CONFIG", md.getName());
// Normalize language codes. Need to do this since a wide variety of
// spellings are acceptable according to ISO.
normalizeIsoLangCodes(md);
// clone this metadata and assign a UUID if not already present
AnalysisEngineMetaData mdCopy = (AnalysisEngineMetaData) md.clone();
if (mdCopy.getUUID() == null) {
mdCopy.setUUID(UUIDGenerator.generate());
}
setMetaData(mdCopy);
// Read parameters from the aAdditionalParams map.
if (aAdditionalParams == null) {
aAdditionalParams = Collections.emptyMap();
}
// determine if verification mode is on
mVerificationMode = aAdditionalParams.containsKey(PARAM_VERIFICATION_MODE);
// determine if this component is Sofa-aware (based on whether it
// declares any input or output sofas in its capabilities)
mSofaAware = getAnalysisEngineMetaData().isSofaAware();
initializeAnalysisComponent();
resetResultSpecificationToDefault();
getLogger().logrb(Level.CONFIG, CLASS_NAME.getName(), "initialize", LOG_RESOURCE_BUNDLE,
"UIMA_analysis_engine_init_successful__CONFIG", md.getName());
return true;
}