I implemented the customResourceSpecifier as described below and
committed the changes.  Michael, maybe you can give this a try with
your PearAnalysisEngineWrapper?

-Adam

On 3/14/07, Michael Baessler <[EMAIL PROTECTED]> wrote:
Adam Lally wrote:
> Currently there's no easy way to plug in an additional kind of service
> adapter (to support a protocol other than SOAP or Vinci).  UIMA
> already has the foundation for pluggable adapters, with its use of
> descriptors and factory methods that produce Resource objects (like
> AnalysisEngines) from descriptors.  But we've never provided a way for
> users to plug in their own adapter classes without editing internal
> framework configuration files.  Here's a simple suggestion that would
> change that:
>
> We could add a new ResourceSpecifier (descriptor) type:
> <customResourceSpecifier
> xmlns="http://uima.apache.org/resourceSpecifier";>
>     <resourceClassName>com.foo.MyCustomServiceAdapter</resourceClassName>
>     <parameters>
>         <parameter name="serviceEndpoint" value="hostname:port"/>
>         ...
>     </parameters>
> </customResourceSpecifier>
>
> The <resourceClassName> specifies the exact name of some user class
> which must be located on the classpath (the UIMA extension classpath
> will work, if provided).  That class must implement the UIMA Resource
> interface (for an AE service adapter it would also have to implement
> the AnalysisEngine interface).  The Resource interface provides a
> method initialize(ResouceSpecifier,Map) which the factory calls and
> passes the resource specifier.  The user would implement the
> initialize method to read the <parameters> and set itself up.
>
> All the basic support for this is already there.  It's relatively easy
> to add a new kind of ResourceSpecifier and the associated factory for
> instantiating the Resource from the specifier.  Then there would be
> the documentation about how to implement your resource class, which
> would be a little more work.
>
> Thoughts?
This sounds very useful to me.

+1 for doing this.

-- Michael


Reply via email to