Model direction enumeration

Text templates and rulesets can declare model parameters (instances of com.sodius.mdw.core.model.Model), which must define a direction.

Here are the available directions:

Keyword Description
in If the text template or ruleset is directly referenced in a launch configuration, MDWorkbench ask the user to select :
  • a model reader, used to load a model before launching the evaluation.
out If the text template or ruleset is directly referenced in a launch configuration, MDWorkbench ask the user to select :
  • a model writer, used to save the model when the evaluation is completed.
inout

If the text template or ruleset is directly referenced in a launch configuration, MDWorkbench ask the user to select :

  • a model reader, used to load a model before launching the evaluation,
  • a model writer, used to save the model when the evaluation is completed.

Note that the model reader and model writer may point at to different physical locations. This means a model may be loaded from a source file, transformed in memory using a ruleset, and saved in a different target file, leaving the source file unchanged.

Note that these directions are used by MDWorkbench just to fill arguments to a launch configuration. In a ruleset contents, you're still free to modify a model in and to query elements in a model out.

A text template is usually used to produce a text output based on model elements that won't be modified during the generation. So most of the time, the direction in will be used to define a template model parameter, although you're free to use out and inout.