google-code-export / uimafit

Automatically exported from code.google.com/p/uimafit
2 stars 1 forks source link

Support nested resources #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
uimaFIT should support the injection of external resources into other external 
resources, e.g.:

AnalysisEngineDescription descriptor = 
AnalysisEngineFactory.createPrimitiveDescription(
    TestAnalysisEngine2.class,
    TestAnalysisEngine2.PARAM_RESOURCE, createExternalResourceDescription(
        TestExternalResource2.class,
    TestExternalResource2.PARAMETER, "value",
    TestExternalResource2.PARAM_RESOURCE, createExternalResourceDescription(
            TestExternalResource.class,
        TestExternalResource.PARAMETER, "value")));

Original issue reported on code.google.com by richard.eckart on 7 Jan 2012 at 9:20

GoogleCodeExporter commented 9 years ago
In order for this to work, we have to change the signatures of some methods in 
ExternalResourceFactory, for example these from "String... aParams" to 
"Object... aParams" to allow using ExternalResourceDescriptions as parameter 
values.

ExternalResourceDescription createExternalResourceDescription(
    Class<? extends Resource> aInterface, Object... aParams)

ExternalResourceDescription createExternalResourceDescription(
    final String aName, Class<? extends Resource> aInterface, Object... aParams) {

I am not sure if this is a binary compatible change.

Original comment by richard.eckart on 7 Jan 2012 at 9:26

GoogleCodeExporter commented 9 years ago
Nested resources should be properly supported now. I had to introduce a custom 
ExtendedExternalResourceDescription_impl which is needed to carry over some 
information from the time the resource description is created to the time the 
resource is bound to a component. Later it is not needed anymore, so that AE 
descriptions can be properly serialized and deserialized using UIMA facilities. 
There are a number of unit tests covering the new code.
---
revision 781

Original comment by richard.eckart on 22 Jan 2012 at 12:16

GoogleCodeExporter commented 9 years ago

Original comment by richard.eckart on 24 Mar 2012 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by richard.eckart on 24 Mar 2012 at 5:10