Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.