You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (Jira)" <de...@uima.apache.org> on 2020/04/04 16:56:00 UTC
[jira] [Commented] (UIMA-6214) Method signature class in
ExternalResourceFactory
[ https://issues.apache.org/jira/browse/UIMA-6214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17075210#comment-17075210 ]
Richard Eckart de Castilho commented on UIMA-6214:
--------------------------------------------------
I'm considering to solve this by renaming once more the methods which bind explicitly to one thingy from {{bindResource}} to {{bindResourceOnce}} (or something along the lines:
* {{void bindResourceOnce(ResourceCreationSpecifier aDesc, String aBindTo, ExternalResourceDescription aRes)}}
* {{void bindResourceOnce(ResourceCreationSpecifier aDesc, String aBindTo, String aRes)}}
* {{void bindResourceOnce(ResourceManagerConfiguration aResMgrCfg, String aBindTo, String aRes)}} (also keep name/signature as deprecated)
* {{void bindResourceOnce(ExternalResourceDescription aRes, String aBindTo, ExternalResourceDescription aNestedRes)}} (also keep name/signature as deprecated)
* {{void bindResourceOnce(ResourceManagerConfiguration aResMgrCfg, String aBindTo, ExternalResourceDescription aRes)}} (also keep name/signature as deprecated)
For the two methods that really clash, I'm planning on not keeping the current name/signatures - only the renamed ones.
For the other three methods that do not clash, I'm considering to keep the current names/signatures in addition to the renamed ones but to deprecate them.
> Method signature class in ExternalResourceFactory
> -------------------------------------------------
>
> Key: UIMA-6214
> URL: https://issues.apache.org/jira/browse/UIMA-6214
> Project: UIMA
> Issue Type: Bug
> Components: uimaFIT
> Affects Versions: 3.0.0uimaFIT
> Reporter: Richard Eckart de Castilho
> Assignee: Richard Eckart de Castilho
> Priority: Major
> Fix For: 3.1.0uimaFIT
>
>
> The renaming of methods in the ExternalResourceFactory between uimaFIT v2 and v3 was designed to remove ambiguities between the method signatures. However, it has introduced a new set of ambiguities...
> There are a few methods meant do bind a resource to one particular thing (resource manager, component, other resource)
> * {{void bindResource(ResourceCreationSpecifier aDesc, String aBindTo, ExternalResourceDescription aRes)}}
> * {{void bindResource(ResourceCreationSpecifier aDesc, String aBindTo, String aRes)}}
> * {{void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo, String aRes)}}
> * {{void bindResource(ExternalResourceDescription aRes, String aBindTo, ExternalResourceDescription aNestedRes)}}
> * {{void bindResource(ResourceManagerConfiguration aResMgrCfg, String aBindTo, ExternalResourceDescription aRes)}}
> Then, there is another bunch of methods meant to scan objects recursively and bind resources wherever applicable:
> * {{void bindResource(ResourceSpecifier aDesc, String aKey, ExternalResourceDescription aResDesc)}}
> * {{void bindResource(ResourceSpecifier aDesc, String aKey, String aUrl)}}
> * {{void bindResource(ResourceSpecifier aDesc, Class<? extends Resource> aRes, String... aParams)}}
> * {{void bindResource(ResourceSpecifier aDesc, Class<?> aApi, Class<? extends Resource> aRes, String... aParams)}}
> * {{void bindResource(ResourceSpecifier aDesc, ExternalResourceDescription aResDesc)}}
> * {{void bindResource(ResourceSpecifier aDesc, String aKey, Class<? extends Resource> aRes, String... aParams)}}
> * {{void bindResource(ResourceSpecifier aDesc, String aKey, File aFile)}}
> * {{void bindResource(ResourceSpecifier aDesc, String aKey, URL aUrl)}}
> * {{void bindResourceUsingUrl(ResourceSpecifier aDesc, Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams)}}
> * {{void bindResourceUsingUrl(ResourceSpecifier aDesc, Class<?> aApi, Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams)}}
> * {{void bindResourceUsingUrl(ResourceSpecifier aDesc, String aKey, Class<? extends SharedResourceObject> aRes, String aUrl, Object... aParams)}}
> There is in particular a conflict between these pairs because {{ResourceCreationSpecifier}} is a subclass of {{ResourceSpecifier}}
> *Pair 1*
> * bind specifically: {{void bindResource(ResourceCreationSpecifier aDesc, String aBindTo, ExternalResourceDescription aRes)}}
> * scan recursively: {{void bindResource(ResourceSpecifier aDesc, String aKey, ExternalResourceDescription aResDesc)}}
> *Pair 2*
> * bind specifically: {{void bindResource(ResourceCreationSpecifier aDesc, String aBindTo, String aRes)}}
> * scan recursively: {{void bindResource(ResourceSpecifier aDesc, String aKey, String aUrl)}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)