uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lally" <ala...@alum.rpi.edu>
Subject Re: Set configuration parameters of a collection reader before it is initialized
Date Thu, 01 Nov 2007 21:36:42 GMT
On 11/1/07, Torsten Zesch <zesch@tk.informatik.tu-darmstadt.de> wrote:
><snip/>
> Is there any way to set the configuration parameters of a collection
> reader before it is actually initialized?
>

Yes, it's possible to do this.  Instead of parseResourceSpecifier,
call parseCollectionReaderDescription.  Then you can call methods on
the CollectionReaderDescription object to change the parameter values.
 Effectively you're overriding the values that were in the descriptor,
before instantiating your component.  The methods to do this are
something like:

collectionReaderDescription.getCollectionReaderMetaData().getConfigurationParameterSettings().setParameterValue(name,value)

But I didn't test that so I might have gotten it slightly wrong.

-Adam

Mime
View raw message