What about checking the aggregate descriptor settings before you
initialize it... like:
File aggDesc = new File("aggregateDescriptor.xml");
XMLInputSource in = new XMLInputSource(aggDesc);
AnalysisEngineDescription aeDesc =
UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
ConfigurationParameterSettings paramSettings =
aeDesc.getAnalysisEngineMetaData().getConfigurationParameterSettings();
So you can check if the necessary settings are available if not you can
throw an exception. If all is fine you can instantiate the ae.
Does this help?
-- Michael
Christoph Büscher wrote:
Hi List,
I would like to be able to check the parameter settings of one of my
custom aggregate TAEs on initialization.
The general idea is that the component engines of the aggregate are
configured in the aggregates XML descriptor via "overrides". However
there are a few constraints on the parameter settings that I would
like to check when the aggregate is initialized.
So far I don't know if and how it is possible to provide an own Java
implementation for the aggregate TAE. If this is possible, the
appropriate place would be the aggregates initialize() method, since
the configuration is accessible there. Can anyone tell me if it is
possible to have an implementation for an aggregate or not and if so,
how? If this isn't possible, where would be another good place to do a
sanity check on the aggregates parameter settings?
Many thanks in advance,
Christoph