[ 
https://issues.apache.org/jira/browse/DAFFODIL-2186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16891491#comment-16891491
 ] 

Brandon Sloane commented on DAFFODIL-2186:
------------------------------------------

If possible, we should provide a simmilar mechanism for user defined layers.

I see 2 different usecases:

1) An API that users of Daffodil the library can take advantage of. Ideally, 
this API would support loading dynamically generated functions

2) An API that users of Daffodil the program can take advantage of.

For (2), I would suggest that we provide 2 mechanisms:

2a) A command line arguement to *.jar file(s).

2b) Any .jar file in the DAFFODIL_CLASSPATH

For any jar file located by either of the above methods, we look for 
_something_ (presumably classes) marked by a Daffodil defined annotation, and 
pass those (or something constructed from them) to the API designed for 
library-users.

As a secondary concern, we should spin off whatever code is needed to create 
these jars into a seperate project. This has 2 benifits:

1) Users don't need to download the entire Daffodil source code to create 
extentions.

2) This will make it easier to avoid leaking internal implementation details.

 

> User defined functions for DPath expressions
> --------------------------------------------
>
>                 Key: DAFFODIL-2186
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2186
>             Project: Daffodil
>          Issue Type: New Feature
>          Components: Back End, Front End
>    Affects Versions: 2.4.0
>            Reporter: Michael Beckerle
>            Priority: Major
>             Fix For: 2.5.0
>
>
> Some things cannot be reasonably expressed in DFDL's DPath expression 
> language.
> A good example of this is the abililty to convert between elevation measured 
> in height above geoid (aka elevation above mean sea level or MSL), and 
> height-above-elipsoid or HAE. This requires a table of numbers and 
> interpolation. Nevertheless a DFDL schema needs to convert units of measure 
> and it is very convenient to have the output of a DFDL parse to be normalized 
> into a desired unit of measure.
> The ability to define a function in a separate jar library, and call it from 
> a DPath expression, having registered it somehow so Daffodil can find it, is 
> what I'm calling a user-defined function.
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to