ResourceSpecifier rs = aeService.resolveTopAnalysisEngineDescription(multiPageEditor.cde.createResourceManager(), false);
if (rs != null) {
if (rs instanceof AnalysisEngineDescription) {
AnalysisEngineDescription aed = (AnalysisEngineDescription) rs;
AEDelegates_Impl delegates = new AEDelegates_Impl(aeService
.getAnalysisEngineDeploymentMetaData(multiPageEditor.cde.createResourceManager()));
Map map = aed.getDelegateAnalysisEngineSpecifiers(multiPageEditor.cde.createResourceManager());
for (Object m : map.entrySet()) {
Map.Entry entry = (Map.Entry) m;
// Trace.err("key: " + entry.getKey() + " ; " + entry.getValue().getClass().getName());
AEDeploymentMetaData_Impl meta = new AEDeploymentMetaData_Impl();
meta.setKey((String) entry.getKey());
// Create a new Error Config
if (entry.getValue() instanceof ResourceSpecifier) {
Object obj = UIMAFramework.getResourceSpecifierFactory()
.createObject(AsyncAggregateErrorConfiguration.class);
((AsyncAEErrorConfiguration) obj).getGetMetadataErrors().setTimeout(0);
meta.setAsyncAEErrorConfiguration((AsyncAEErrorConfiguration) obj);
} else {
Trace.bug("ResourceSpecifier == null for " + meta.getKey());
}
delegates.addDelegate(meta);
}
aeService.getAnalysisEngineDeploymentMetaData(multiPageEditor
.cde.createResourceManager()).setDelegates(delegates);