CpmLocalizedMessage.getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
"UIMA_CPM_EXP_missing_required_element__WARNING", new Object[] {
Thread.currentThread().getName(), "<collectionReader>" })));
}
CpeCollectionReaderIterator cit = reader.getCollectionIterator();
if (cit == null || cit.getDescriptor() == null || cit.getDescriptor().getInclude() == null) {
throw new ResourceConfigurationException(InvalidXMLException.ELEMENT_NOT_FOUND,
new Object[] { "<include>", "<collectionIterator>" }, new Exception(
CpmLocalizedMessage.getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
"UIMA_CPM_EXP_missing_required_element__WARNING", new Object[] {
Thread.currentThread().getName(), "<include>" })));
}
if (cit.getDescriptor().getInclude().get() == null) {
throw new ResourceConfigurationException(InvalidXMLException.ELEMENT_NOT_FOUND,
new Object[] { "<href>", "<collectionIterator>" }, new Exception(
CpmLocalizedMessage.getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
"UIMA_CPM_EXP_missing_attribute_from_xml_element__WARNING",
new Object[] { Thread.currentThread().getName(), "<href>",
"<collectionIterator>" })));
}
String descriptorPath = CPMUtils.convertToAbsolutePath(System.getProperty("CPM_HOME"),
CPM_HOME, cit.getDescriptor().getInclude().get());
// create new collection reader from the descriptor
XMLInputSource in1 = new XMLInputSource(descriptorPath);
ResourceSpecifier colReaderSp = UIMAFramework.getXMLParser()
.parseCollectionReaderDescription(in1);
overrideParameterSettings(colReaderSp, cit.getConfigurationParameterSettings(),
descriptorPath, "Collection Reader");
// compute sofa mapping for the CAS Initializer
CpeSofaMappings sofanamemappings = cit.getSofaNameMappings();
HashMap sofamap = new HashMap();
if (sofanamemappings != null) {
CpeSofaMapping[] sofaNameMappingArray = sofanamemappings.getSofaNameMappings();
for (int i = 0; sofaNameMappingArray != null && i < sofaNameMappingArray.length; i++) {
CpeSofaMapping aSofaMap = sofaNameMappingArray[i];