uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Greene <sgre...@coderyte.com>
Subject Re: DataResources
Date Fri, 16 Mar 2012 20:00:09 GMT
Well, to answer my own question, I see that I can set a CustomResourceSpecifier by editing
my descriptor xml directly (thanks to a post by Adam Lally in 2008; http://www.mail-archive.com/uima-user@incubator.apache.org/msg01437.html

I have this now:

        <description>my resource</description>
            <parameter name="param1" value="paramval1"/>
            <parameter name="param2" value="paramval2"/>

I then implemented as

public class MyDataResource extends Resource_ImplBase implements ParameterizedDataResource,
DataResource, SharedResourceObject

This actually works and does what I want. But I suspect I'm not really using the framework
correctly. Does anyone knows the canonical way to use these various Resource classes?


On Mar 16, 2012, at 12:30 PM, Stephan Greene wrote:

> I am implementing a SharedResourceObject which requires a DataResource more involved
than just a url to access the data the resource represents. I need something like the ParameterizedDataResource
-- but I don't see how to instantiate this. The load() method of SharedResourceObject takes
a DataResource object parameter. How do I configure my SharedResourceObject to use some other
kind of DataResource? I know how to implement the data resource I need, but I can't figure
out how to tell the framework that I want to use my own data resource with my own SharedResourceObject.
> Does it involve a CustomResourceSpecifier? I can't figure out how to use that, either.
Any help appreciated.
> Stephan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message