// update the sofa mappings in the AE descriptor with the mappings
// specified in the context if the AE descriptor is for an aggregate
// Ae and contains sofa mappings
if (resourceDescription instanceof AnalysisEngineDescription &&
! ((AnalysisEngineDescription) resourceDescription).isPrimitive()) {
ComponentInfo compInfo = ((UimaContextAdmin) context).getComponentInfo();
SofaMapping[] aggSofaMapping = ((AnalysisEngineDescription)resourceDescription).getSofaMappings();
if (aggSofaMapping != null && aggSofaMapping.length > 0) {
for (int i = 0; i < aggSofaMapping.length; i++) {
String absoluteSofaName = compInfo
.mapToSofaID(aggSofaMapping[i].getAggregateSofaName());
aggSofaMapping[i].setAggregateSofaName(absoluteSofaName);
}
}
}