Hi, basically I'm looking for a way to manage engine descriptions. So
far I'm using createEngineDescription(...) when building a pipeline. If
my component, i.e. in the case of uimaFIT the class that implements the
AE, defines good default values that is very easy and concise.
However, I also have many cases where I have different
descriptors/descriptions that use the same class, and sometimes I then
again override some parameters. I would like to manage those
descriptions separately from the pipeline where they are used, e.g. with
Maven. I want to avoid copy and pasting common parameter configurations
from one pipeline to the other.
So far I was using different XML descriptors, each packaged in a
separate PEAR as an independent component, and would build my pipeline
based on those. With uimaFIT I haven't found a good way to do this.
Basically I would like to have inheritance at the description level.
This could either be through Java inheritance (i.e. CountryMapper.class
extends ConceptMapper.class and overrides default parameter values) or
through a way to store EngineDescriptions and reuse them, without having
to resort to XML files.
So I would in some place define "countryMapper =
createEngineDescription(ConceptMapper.class, <parameters>)" and package
that as a Maven artifact, and somewhere else use it to build a pipeline
using createEngineDescription(countryMapper, <additional_parameters>).
My problem is that I don't think I can override the default values with
Java inheritance, and don't have a good way to package
EngineDescriptions. I guess I could have a class with a static method
that returns the engine description and package that, but it would be
nice to have something more "standard" and elegant.
Thanks,
Jens
On 11/28/2013 12:37 AM, Richard Eckart de Castilho wrote:
Hi,
I'm not sure that I understand what you want to do. When you create a
descriptor for a component e.g. using createEngineDescription(…), this
descriptor is configured with the default values (unless you override them in
the call to createEngineDescription).
You can change parameters on such a descriptor using
ResourceCreationSpecifierFactory.setConfigurationParameters(…)
Does that help? Can you make a more vivid example of what you are trying to
accomplish, maybe with a bit if pseudo-code marking those places that remain
unclear how to handle them?
Cheers,
-- Richard
On 27.11.2013, at 07:47, Jens Grivolla <[email protected]> wrote:
Hi,
so far we were using PEARs to manage different configurations of components,
e.g. having a CountryMapper, CityMapper, PersonMapper, etc., all based on
ConceptMapper but with different settings/models.
How would I do that in uimaFIT? Basically I would like to create components
that just override the default values for parameters/resources.
In some cases, parameters are additionally overridden at the pipeline level
(CPE/uimaFIT), e.g. when using a database CasConsumer where we would have
several base configurations (e.g. annotation to DB column mappings), but then
override the DB connection settings in the pipeline.
Having the full configuration at the pipeline level makes it much more
difficult to manage configurations, so I would like to be able to point to a
given component and automatically get the correct default settings.
Thanks,
Jens