uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: messed up the impl of UIMA-2977 - calling destroy() method on External Resources
Date Thu, 20 Oct 2016 19:01:34 GMT
Well, now further up the learning curve.

I was mislead by finding some examples of External Resource impl which
implemented SharedResourceObject, but did not implement Resource. 

More careful reading of the code shows it assumes that resource impls *are*
instances of Resource.

So- back to work...


On 10/20/2016 10:58 AM, Marshall Schor wrote:
> I had an incorrect understanding of the UIMA model for this, and confused an
> instance of Resource with an instance of its implementation.
> A Resource in UIMA is an Interface implemented by framework code parts that are
> specializations for the many kinds of resources managed by UIMA.
> These resources are created from Resource Specifiers using produceResource.
> One aspect of Resource instances is that they contain a reference to an
> "implementation" - another Java class, which is *not* an instance of Resource.
> This aspect is only present in some kinds of resources.  For External Resources,
> the descriptor for this, and its internal Java class
> (ExternalResourceDescription) have an element, "implementationName", which is
> name of the Java class implementing the resource.  This class doesn't implement
> the Resource API.
> I incorrectly switched several parts of ResourceManager_impl from Object to
> Resource based on my misunderstanding, and will now revert that.
> -Marshall

View raw message