Richard Eckart de Castilho created UIMA-6475:
------------------------------------------------
Summary: Add getResourceManager() method to
AnalysisComponent_ImplBase
Key: UIMA-6475
URL: https://issues.apache.org/jira/browse/UIMA-6475
Project: UIMA
Issue Type: Improvement
Components: Core Java Framework
Reporter: Richard Eckart de Castilho
Assignee: Richard Eckart de Castilho
Fix For: 3.4.0SDK
The {{Resource}} interface has a method to fetch the {{ResourceManager}}. That
means that shared/external resources can access their resource manager and also
collection readers and cas consumers. But flow controllers and annotators do
not inherit from {{Resource_ImplBase}} and to not have access to their
{{ResourceManager}} other than manually casting the {{UimaContext}} to
{{UimaContextAdmin}} and fishing it out of there.
While it is generally a good idea to load resources through the methods
provided by the {{UimaContext}}, there are also cases where direct access to
the resource manager is convenient.
Considering that resources, collection readers and cas consumers already have
access to their resource manager, I wonder if it would not be sensible to also
allow access for annotators and flow controllers... or the other way around to
deprecate the access to the resource manager in the {{Resource}} interface.
I tend towards allowing access for annotators and flow controllers.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)