Jump to: navigation, search

Difference between revisions of "Map EMF type elements"

Line 1: Line 1:
Below you see how the EMF type elements are mapped to JCR type elements. The pseudo objects "eClass" and "nodeType" are used to illustrate the concrete properties.
+
= Mapping of EMF type elements to JCR type elements =
 +
Below you see how the EMF type elements are mapped to JCR type elements. The pseudo source code used to illustrate the concrete mapping.
 
The mapping is implemented as a model to model transformation in the oee.jcrm.conversion plugin using the oAW Xtend expressions language. It is triggered and configured using the oAW workflow engine.
 
The mapping is implemented as a model to model transformation in the oee.jcrm.conversion plugin using the oAW Xtend expressions language. It is triggered and configured using the oAW workflow engine.
 
The mapping from a concrete Ecore model to node types is declared in the annotations of the Ecore classes.
 
The mapping from a concrete Ecore model to node types is declared in the annotations of the Ecore classes.
Line 48: Line 49:
 
| eClass.eReference.upperBounds=-1
 
| eClass.eReference.upperBounds=-1
 
| nodeType.childNodeDefinition.!(name!="*" && !allowsSameNameSiblings)
 
| nodeType.childNodeDefinition.!(name!="*" && !allowsSameNameSiblings)
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
|
 
|
 
|-
 
 
|}
 
|}

Revision as of 13:50, 20 August 2008

Mapping of EMF type elements to JCR type elements

Below you see how the EMF type elements are mapped to JCR type elements. The pseudo source code used to illustrate the concrete mapping. The mapping is implemented as a model to model transformation in the oee.jcrm.conversion plugin using the oAW Xtend expressions language. It is triggered and configured using the oAW workflow engine. The mapping from a concrete Ecore model to node types is declared in the annotations of the Ecore classes.

EMF ECore Element JCR node type Element Description
eClass nodeType
eClass.name nodeType.name
eClass.isInterface nodeType.isMixin
eClass.eSuperTypes nodeType.declaredSuperTypes
eClass.eAttribute nodeType.propertyDefinition
eClass.eAttribute.name nodeType.propertyDefinition.name
eClass.eAttribute.type nodeType.propertyDefinition.requiredType
EString String
eClass.eReference containment=true nodeType.childNodeDefinition
eClass.eReference.name containment=true nodeType.childNodeDefinition.name
eClass.eReference.type containment=true nodeType.childNodeDefinition.requiredPrimaryTypes @ToDo Add description how multiple required primary types are handled.
eClass.eReference.upperBounds=1 nodeType.childNodeDefinition.(name!="*" && !allowsSameNameSiblings)
eClass.eReference.upperBounds=-1 nodeType.childNodeDefinition.!(name!="*" && !allowsSameNameSiblings)