Hi to all,
I need to build an aggregate angine in a programmatic way, but I
didn't find anything in the docs or api.
I'm using a CPM, where i deploy some processors, consumers and a
collection reader.
Now I want to process a single string and try this:
...
cpm.init(true, new Properties());
AnalysisEngine analysisEngine = this.cpm.getAnalysisEngine();
...
but i got an ArrayIndexOutOfBoundException.
Taking a look at the CPMImpl, i saw this code:
public AnalysisEngine getAnalysisEngine() {
if (super.getCasProcessors()[0] != null) {
try {
if (super.getCasProcessors()[0] instanceof AnalysisEngine) {
return (AnalysisEngine) super.getCasProcessors()[0];
}
} catch (ClassCastException cE) {
cE.printStackTrace();
return null;
}
}
return null;
}
the AIOBE is on the super.getCasProcessors()[0] statement.
So, at least, I will get the first processor deployed, not a whole
analysys engine composed of all casprocessor :(
I'm thinking to switch to a CPE instead of CPM, but i think it will be the same.
regards,
Roberto
--
Roberto Franchini
CELI s.r.l. (http://www.celi.it) - C.so Moncalieri 21 - 10131 Torino - ITALY
Tel +39-011-6600814 - Fax +39-011-6600687
jabber:[EMAIL PROTECTED] skype:ro.franchini