Map<String, RutaModule> additionalScriptsMap = new HashMap<String, RutaModule>();
Map<String, AnalysisEngine> additionalEnginesMap = new HashMap<String, AnalysisEngine>();
if (additionalUimafitEngines != null) {
for (String eachUimafitEngine : additionalUimafitEngines) {
AnalysisEngine eachEngine = null;
try {
@SuppressWarnings("unchecked")
// Class clazz = this.getClass().getClassLoader().loadClass(eachUimafitEngine) ;
Class<? extends AnalysisComponent> uimafitClass = (Class<? extends AnalysisComponent>) Class
.forName(eachUimafitEngine);
eachEngine = AnalysisEngineFactory.createEngine(uimafitClass);
} catch (ClassNotFoundException e) {
throw new AnalysisEngineProcessException(e);
} catch (ResourceInitializationException e) {
throw new AnalysisEngineProcessException(e);
}
try {
additionalEnginesMap.put(eachUimafitEngine, eachEngine);
String[] eachEngineLocationPartArray = eachUimafitEngine.split("\\.");
if (eachEngineLocationPartArray.length > 1) {
String shortEachEngineLocation = eachEngineLocationPartArray[eachEngineLocationPartArray.length - 1];
additionalEnginesMap.put(shortEachEngineLocation, eachEngine);
}
} catch (Exception e) {
throw new AnalysisEngineProcessException(e);
}
}
}
if (additionalEngines != null) {
for (String eachEngineLocation : additionalEngines) {
AnalysisEngine eachEngine;
String location = locate(eachEngineLocation, descriptorPaths, ".xml");
if (location == null) {
String locationIS = locateIS(eachEngineLocation, descriptorPaths, ".xml");
try {
eachEngine = engineLoader.loadEngineIS(locationIS, viewName);