java.lang.Objectcom.sodius.mdw.internal.core.atl.AbstractATLRunner
com.sodius.mdw.core.atl.ATLRunner
public class ATLRunner
Enables launching of an ATL transformation from MDWorkbench.
Here is an example of how ATLRunner can be used from MQL Code:
// initializes required ATL parameters
var atlModulePath = "com/samples/UML2Relational.asm"; // module path
var inModels = {"source" = umlModel}; // input model
var outModels = {"target" = relationalModel}; // output model
// launches the evaluation of ATL module
ATLRunner.run(atlModulePath, inModels, outModels);
| Constructor Summary | |
|---|---|
ATLRunner(String asmModulePath,
Map inModels,
Map outModels)
Creates a new instance of an ATL runner. |
|
ATLRunner(URL asmModuleURL,
Map inModels,
Map outModels)
Creates a new instance of an ATL runner. |
|
| Method Summary | |
|---|---|
void |
addLibrary(String libraryId,
String path)
Registers an ATL library. |
void |
addLibrary(String libraryId,
URL url)
Registers an ATL library. |
void |
run(com.sodius.mdw.core.util.log.Logger logger,
com.sodius.mdw.core.util.progress.ProgressMonitor monitor)
Launches the evaluation of the ATL module. |
static void |
run(String asmModulePath,
Map inModels,
Map outModels)
Launches an evaluation of an ATL module from MDWorkbench. |
static void |
run(String asmModulePath,
Map inModels,
Map outModels,
Map asmLibraryPaths)
Launches an evaluation of an ATL module from MDWorkbench. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ATLRunner(String asmModulePath,
Map inModels,
Map outModels)
The module path is a '/'-separated path, resolved to an URL using the method getResource(name) on the thread
context class loader.
The models maps are used to identify the input and output models to be used in the ATL module.
The key is a String which identifies the corresponding module parameter.
The value is an instance of com.sodius.mdw.model.Model.
asmModulePath - the path of the asm module to be launched.inModels - the map of the input MDWorkbench model instances.outModels - the map of the output MDWorkbench model instances.
public ATLRunner(URL asmModuleURL,
Map inModels,
Map outModels)
The models maps are used to identify the input and output models to be used in the ATL module.
The key is a String which identifies the corresponding module parameter.
The value is an instance of com.sodius.mdw.model.Model.
asmModuleURL - the URL of the asm module to be launched.inModels - the map of the input MDWorkbench model instances.outModels - the map of the output MDWorkbench model instances.| Method Detail |
|---|
public void addLibrary(String libraryId,
String path)
libraryId - identifier of the corresponding library parameterpath - a '/'-separated path, resolved to an URL using the method getResource(name) on the thread
context class loader.
public void addLibrary(String libraryId,
URL url)
addLibrary in class com.sodius.mdw.internal.core.atl.AbstractATLRunnerlibraryId - identifier of the corresponding library parameterurl - the URL of the library.
public void run(com.sodius.mdw.core.util.log.Logger logger,
com.sodius.mdw.core.util.progress.ProgressMonitor monitor)
throws com.sodius.mdw.core.CoreException
run in class com.sodius.mdw.internal.core.atl.AbstractATLRunnerlogger - the logger used to report errors and warnings, as well as debugging information (can be null)monitor - the progress monitor used to report progress information (can be null)
com.sodius.mdw.core.CoreException - if this evaluation fails
public static void run(String asmModulePath,
Map inModels,
Map outModels)
throws com.sodius.mdw.core.CoreException
The module path is a '/'-separated path, resolved to an URL using the method getResource(name) on the thread
context class loader.
The models maps are used to identify the input and output models to be used in the ATL module.
The key is a String which identifies the corresponding module parameter.
The value is an instance of com.sodius.mdw.model.Model.
asmModulePath - the path of the asm module to be launched.inModels - the map of the input MDWorkbench model instances.outModels - the map of the output MDWorkbench model instances.
com.sodius.mdw.core.CoreException - if this evaluation fails
public static void run(String asmModulePath,
Map inModels,
Map outModels,
Map asmLibraryPaths)
throws com.sodius.mdw.core.CoreException
The module path is a '/'-separated path, resolved to an URL using the method getResource(name) on the thread
context class loader.
The models maps are used to identify the input and output models to be used in the ATL module.
The key is a String which identifies the corresponding module parameter.
The value is an instance of com.sodius.mdw.model.Model.
The keys or the map libraries must be String values that identifies the corresponding library parameters.
The values must either be URL or String paths.
asmModulePath - the path of the asm module to be launched.inModels - the map of the input MDWorkbench model instances.outModels - the map of the output MDWorkbench model instances.asmLibraryPaths - the map of asm library paths (either String or URL values)
com.sodius.mdw.core.CoreException - if this evaluation fails