uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Gazzo <mario.ga...@gmail.com>
Subject Re: Injecting nested resources using UIMA fit
Date Sat, 23 May 2015 20:45:37 GMT
Thank you, Richard. The reason I use bindExternalResource is because I have a light DSL layer
on top where everything get’s wired together from different aggregate modules. This way
the modules don’t need to be that tightly coupled up front but I just do the binding generically
right before the execution. The example doesn’t show this.

The reason we are still using UIMA 2.6 is just because we haven’t had the time to test 2.7
yet. I upgraded my own branch now so I intend to start testing it and we will likely move
to 2.7 because we could among other things benefit from the new compact binary format.

Cheers
Mario

> On 23 May 2015, at 22:21 , Richard Eckart de Castilho <rec@apache.org> wrote:
> 
> Ok, so here is the analysis. There are two independent reasons why the code does
> not work.
> 
> 
> == Unexpected used of "bindExternalResource" ==
> 
> I did not foresee using "bindExternalResource" for binding
> a nested resource to a resource. So instead of
> 
> resourceA = createExternalResourceDescription(ResourceA.class,"http://resource.org/a");
> resourceB = createExternalResourceDescription(ResourceB.class,"http://resource.org/b");
> bindExternalResource(resourceB, ResourceA.RESOURCE_A_KEY, resourceA);
> 
> You need to write:
> 
> resourceA = createExternalResourceDescription(ResourceA.class,"http://resource.org/a");
> resourceB = createExternalResourceDescription(ResourceB.class,"http://resource.org/b",
>  ResourceA.RESOURCE_A_KEY, resourceA);
> 
> The reason here is that part of the magic that makes nesting work happens in 
> createExternalResourceDescription and is missed if bindExternalResource is used.
> 
> Still, bindExternalResource shouldn't fail with an NPE here - it should give a reasonable
> message. And it should behave consistently, so produce the same error no matter when
it
> is called in the code - or it should just work as expected...
> 
> 
> == createExternalResourceDescription for SharedResourceObjects missing code ==
> 
> The proper code for handling nested resources is missing from the createExternalResourceDescription
> variant used to with SharedResourceObjects. This is an oversight and will be fixed. I've
done a
> local fix and will commit that soon.
> 
> 
> Btw. any reason you are still on UIMA 2.6.0? I am considering to do the next uimaFIT
release
> based on 2.7.0 (and Java 1.6).
> 
> -- Richard


Mime
View raw message