Brandon Sloane had suggested the following on the wiki

Our service provider only offers a lookup function. We might also want it to 
offer a way of querying a list of all defined functions.

I like the idea as it can be used to access all the function classes of each 
provider without actually instantiating them as the lookup functions do.

A simple way to achieve this would be for each UDF provider to have a static 
Class<?> array field with all the function classes it supports.

It'd have something like the below in its constructor where FunA & FuncB are 
the function classes it supports.

super.setFunctionClasses( new Class<?>[] { FuncA.class, FuncB.class } );

Each of these classes can in turn have annotations that identify their name and 
namespace. So calling the getter on this field would give our service loader 
access to all the function classses supported, as well the relevant metadata on 
them. Thoughts?

On 9/6/19 10:30 AM, Kilo, Olabusayo wrote:

I'm requesting a discussion on the addition of the User Defined Functions 
capability to daffodil. The proposal referenced below provides a possible 
solution for Daffodil to be able to process and use User Defined Functions 
referenced in the DFDL Schema.

The original request can be found at 
https://issues.apache.org/jira/browse/DAFFODIL-2186 and the proposal can be 
found 
https://cwiki.apache.org/confluence/display/DAFFODIL/Proposal%3A+User+Defined+Functions.


--
Best Regards
Lola K.

Reply via email to