soundasleep / iaml

Automatically exported from code.google.com/p/iaml
3 stars 1 forks source link

Introduce XQuery Functions and Predicates #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?
Once issue 245 is complete, existing XQuery functions such as op:numeric-add 
and fn:contains should be added to the metamodel, perhaps as part of an 
imported library. Not all functions have to be implemented in the 
proof-of-concept implementation.

What goal would this enhancement help you achieve?
This is a recognised sub-goal of issue 234: Implement metamodel changes as 
discussed in metamodel review

Original issue reported on code.google.com by soundasleep on 28 Apr 2011 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by soundasleep on 28 Apr 2011 at 1:11

GoogleCodeExporter commented 9 years ago

Original comment by soundasleep on 28 Apr 2011 at 1:11

GoogleCodeExporter commented 9 years ago
incorrect issue title

Original comment by soundasleep on 6 May 2011 at 6:21

GoogleCodeExporter commented 9 years ago
In r2881, a first solution was attempted, where a FunctionLibrary contained any 
number of XQueryFunctions, and these Functions could then be referenced by GMF 
editors. That is, a Function could be referenced, e.g:

<conditionEdges ...>
  <function href="platform:/plugin/org.openiaml.model/model/xquery-functions.iaml_library#//fn_numeric_equal" />
</conditionEdges>

However, the generated GMF editors did not allow for these XQueryFunctions to 
be displayed, or for existing SimpleConditions to refer to them:

- XQueryFunctions cannot be dragged onto the diagram editor. An extension to 
the project navigator view would have to be created.
- A platform resource can not be loaded through registered packages, and has to 
be typed in manually (see GMF forums).
- The ConditionEdge reference cannot be set to an element in a loaded resource; 
the element is displayed, but no change occurs.
- If the reference is created manually, GetShortcuts.getSourceElement() returns 
null for XQueryFunction.

Consequently, there is a significant amount of development work that would have 
to occur to support the arbitrary inclusion of Function libraries in IAML.

An easier solution is to simply provide an Enum of XQuery functions in the IAML 
metamodel, and allowing user-created XQueryFunctions to refer to one of these 
values. This is the current approach advocated as per issue 234.

Original comment by soundasleep on 10 May 2011 at 7:08

GoogleCodeExporter commented 9 years ago
Regarding loading platform resources through registered packages: 
http://www.eclipse.org/forums/index.php/t/209036/

It is possible to use the Ecore editor's extension of the LoadResourcesAction 
to provide a list of registered Ecore packages in the system.

Original comment by soundasleep on 11 May 2011 at 12:13

GoogleCodeExporter commented 9 years ago
A number of functions have been implemented as of r2894.

Original comment by soundasleep on 11 May 2011 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by soundasleep on 16 May 2011 at 6:02