Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-6214

Method signature clash in ExternalResourceFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0uimaFIT
    • 3.1.0uimaFIT
    • uimaFIT
    • None

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              rec Richard Eckart de Castilho
              rec Richard Eckart de Castilho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m