// expand the aggregate AE description into the individual delegates
ArrayList<AnalysisEngineDescription> l = new ArrayList<AnalysisEngineDescription>();
l.add(aAggregateDescription);
List<ProcessingResourceMetaData> mdList = getMetaDataList(l, aResourceManager, aOutputFailedRemotes);
ProcessingResourceMetaData result = UIMAFramework.getResourceSpecifierFactory()
.createProcessingResourceMetaData();
// extract type systems and merge
List<TypeSystemDescription> typeSystems = new ArrayList<TypeSystemDescription>();
Iterator<ProcessingResourceMetaData> it = mdList.iterator();
while (it.hasNext()) {
ProcessingResourceMetaData md = (ProcessingResourceMetaData) it.next();
if (md.getTypeSystem() != null)
typeSystems.add(md.getTypeSystem());
}
result.setTypeSystem(mergeTypeSystems(typeSystems, aResourceManager, aOutputMergedTypes));
// extract TypePriorities and merge
List<TypePriorities> typePriorities = new ArrayList<TypePriorities>();
it = mdList.iterator();
while (it.hasNext()) {
ProcessingResourceMetaData md = it.next();
if (md.getTypePriorities() != null)
typePriorities.add(md.getTypePriorities());
}
result.setTypePriorities(mergeTypePriorities(typePriorities, aResourceManager));
// extract FsIndexCollections and merge
List<FsIndexCollection> fsIndexes = new ArrayList<FsIndexCollection>();
it = mdList.iterator();
while (it.hasNext()) {
ProcessingResourceMetaData md = it.next();
if (md.getFsIndexCollection() != null)
fsIndexes.add(md.getFsIndexCollection());
}
result.setFsIndexCollection(mergeFsIndexes(fsIndexes, aResourceManager));
return result;
}