uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-2903) List resources in a ResourceManager / remove hack in uimaFIT
Date Thu, 20 Oct 2016 13:46:59 GMT

    [ https://issues.apache.org/jira/browse/UIMA-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15591852#comment-15591852

Marshall Schor commented on UIMA-2903:

UIMA-5148 will change the External Resources instantiation to have the creating ResourceManager
be returned from the Reource's getResourceManager() API call.

I think it would be hard to defer the initialization of resources until all the non-parameterized
ones have been loaded (but not initialized).  

So, instead, let's address this Jira by the approach in the title - adding an ability to list
External resources being managed by a ResourceManager.  
This will add one or two methods to ResourceManager, to return the list of External Resources.
 The varieties are needed to handle both:
# ordinary External Resources: these have 1 instance, and are members of the internal Resource
Registration Map.
# parameterized External Resources: these have 0 or more instances, created "on demand" by
the getResource(...) call which passes additional string parameters to select a particular
version of the resource.

> List resources in a ResourceManager / remove hack in uimaFIT
> ------------------------------------------------------------
>                 Key: UIMA-2903
>                 URL: https://issues.apache.org/jira/browse/UIMA-2903
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework, uimaFIT
>            Reporter: Richard Eckart de Castilho
>              Labels: Resources
>             Fix For: 2.3.0uimaFIT
> uimaFIT currently gets a list of resources that are registered with a ResourceManager.
This is handled via accessing the "mResourceMap" field of the ResourceManager_impl class via
reflection. Obviously, this is not a good solution.
> uimaFIT iterates over the resources in the context while initializing resources that
are referenced from other external resources.
> There may be two options:
> # add a listResources() method to the ResourceManager interface
> # get the resources that need to be initialized in some other way. I don't know if there
is one, because if there was, I'd probably have used it. Looking at the @ExternalResource
annotations doesn't help, because they do not give informations about the resource bindings.
The bindings are only available in the ResourceManager, which takes us back to 1).
> Would it be possible to add a method allowing to list the resource bindings registered
in a ResourceManager to the ResourceManager interface?

This message was sent by Atlassian JIRA

View raw message