Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change transformation framework to use ModeShape structure via CND #170

Open
jpav opened this issue Jul 30, 2014 · 3 comments
Open

Change transformation framework to use ModeShape structure via CND #170

jpav opened this issue Jul 30, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@jpav
Copy link
Contributor

jpav commented Jul 30, 2014

No description provided.

@jpav jpav added this to the 0.1 milestone Jul 30, 2014
@jpav jpav added the task label Jul 30, 2014
@elvisisking
Copy link
Contributor

Here's a first cut at a CND:

<tx = 'http://www.polyglotter.org/transform/1.0'>
<mm = 'http://modeshape.org/modeshape-modeler/1.0'>

[tx:descriptor]
  - tx:version (string) = "1.0.0" autocreated
  - tx:description (string)
  - tx:modifiable (boolean) = 'true' autocreated
  - tx:requiredCount (long) = '1' autocreated
  - tx:unbounded (boolean) = 'false' autocreated
  - tx:outputType (string) mandatory

[tx:model]
  - tx:modelType (string) mandatory < 'SOURCE', 'TARGET', 'SOURCE_TARGET'
  - tx:modelPath (string) mandatory

[tx:input]
  - tx:descriptorRef (reference) = 'tx:descriptor' mandatory
  - tx:modelObjectPath (string)
  - tx:value (string)

[tx:operation]
  - tx:descriptorRef (reference) = 'tx:descriptor' mandatory
  - tx:script (string) mandatory
  + tx:inputs (tx:input) = tx:input copy sns

[tx:transformation] > mm:model mixin
  + tx:models (tx:model) = tx:model copy
  + tx:operations (tx:operation) = tx:operation copy sns

@elvisisking
Copy link
Contributor

Here is next version of transform.cnd incorporating the changes we discussed @jpav:

<tx = 'http://www.polyglotter.org/transform/1.0'>
<mm = 'http://modeshape.org/modeshape-modeler/1.0'>

/*
 * An operation input. The node name is the descriptor ID that this input uses.
 * 
 * Properties:
 *   path - 'true' if the 'value' property represents a node path
 *   value - the input value (usually a path to a model object but can be a literal) 
 */
[tx:input]
  - tx:path (boolean) = 'true' autocreated
  - tx:value (string) mandatory

/*
 * An operation included in a transformation. The node name is the operation output descriptor ID. 
 * 
 * Properties:
 *   descriptorId - the descriptor ID for the output value of the operation
 *   text - the DSL representing the operation
 * 
 * Children: the operation inputs named by there descriptor ID
 */
[tx:operation]
  - tx:descriptorId (string) mandatory
  - tx:text (string) mandatory
  + * (tx:input) = tx:input copy sns

/*
 * A transformation model.
 * 
 * Properties:
 *   sources - multi-valued list of source model paths
 *   targets - multi-valued list of target model paths
 * 
 * Children: the operations named by there descriptor ID
 */
[tx:transformation] > mm:model mixin
  - tx:sources (path) multiple
  - tx:targets (path) multiple
  + * (tx:operation) = tx:operation copy sns

@jpav
Copy link
Contributor Author

jpav commented Aug 26, 2014

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants