Hello,
i just noticed that the method for creation of analysis engines and external resources is different.
For AE's, this works:
AnalysisEngineFactory.createEngineDescription(
SomeEngine.class,SomeEngine.PARAM_BOOLEAN, true
)
But for external resources, the same syntax fails with a ClassCastException
ExternalResourceFactory.createExternalResourceDescription(
SomeResource.class, SomeResource.PARAM_BOOLEAN, true
)
Looking at the code, I see that ExternalResourceFactory.createExternalResourceDescription(String,Class<? extends Resource>,Object...), which is called by the method above, actually casts parameter values to String on line 177.
Why is this so? Wouldn't it be preferable to have a consistent interface for all component types?
Thanks!
jta
--
entia non sunt multiplicanda praeter necessitatem