sudeep87 / uimafit

Automatically exported from code.google.com/p/uimafit
0 stars 0 forks source link

Allow overriding of default parameter values by sub-classes #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The DKPro ResourceCollectionReaderBase has a mandatory parameter by which it 
selects files to be read. This parameter has no default value. We would like to 
be able to override the default value of the parameter in a subclass - e.g. 
PdfReader should per default select all PDF files.

Original issue reported on code.google.com by richard.eckart on 25 Mar 2011 at 2:59

GoogleCodeExporter commented 8 years ago
You can tell by now from my various comments that I am reading through all the 
recent issues out of order.  In issue #72 I suggest that maybe we shouldn't 
even have a 'defaultValue' element.  Per that suggestion, a simple workaround 
for the issue you raise here is to have PdfReader simply initialize the config 
param member variable directly with the default value for that subclass (such 
that the values in UimaContext can still override it.)

Original comment by phi...@ogren.info on 27 Mar 2011 at 3:20

GoogleCodeExporter commented 8 years ago
See comment in issue #72 (provided here for convenience):

For subclasses it would probably be easy to override a parameter value in the 
initializer if no defaultValue parameter would exist.

Reconfiguration of a component is an issue without defaultValue, because there 
would need to be some extra code that resets the components fields to the 
default values before applying the new configuration parameters.
Note though, that uimaFIT currently does not support reconfiguration in its 
convenience classes - we should probably open an issue for that.

Original comment by richard.eckart on 27 Mar 2011 at 4:29

GoogleCodeExporter commented 8 years ago
Note: No issue is necessary regarding reconfiguration- per default 
reconfigure() calls initialize() again, so uimaFIT is called during 
reconfiguration.

Original comment by richard.eckart on 27 Mar 2011 at 4:32

GoogleCodeExporter commented 8 years ago

Original comment by richard.eckart on 7 Jan 2013 at 4:51