Package org.contextmapper.dsl.standalone
Interface StandaloneContextMapperAPI
- All Known Implementing Classes:
StandaloneContextMapper
public interface StandaloneContextMapperAPI
Interface that eases the usage of Context Mapper in standalone (usage as
library) scenario.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyRefactoring
(CMLResource cml, SemanticCMLRefactoring refactoring) Applies a refactoring (must be of type SemanticCMLRefactoring) on a CML model.void
callGenerator
(CMLResource cml, org.eclipse.xtext.generator.IGenerator2 generator) Calls a generator that produces output (Graphical Context Map, PlantUML, etc.) given a CML resource as input.void
callGenerator
(CMLResource cml, org.eclipse.xtext.generator.IGenerator2 generator, String outputDir) Calls a generator that produces output (Graphical Context Map, PlantUML, etc.) given a CML resource as input.Creates a new CML model.Creates a new CML model.Loads a CML model, given a *.cml file.Loads a CML model, given a *.cml file.
-
Method Details
-
loadCML
Loads a CML model, given a *.cml file.- Parameters:
filepath
- the path to the *.cml file that shall be loaded- Returns:
- the CMLResource loaded from the *.cml file
-
loadCML
Loads a CML model, given a *.cml file.- Parameters:
cmlFile
- the *.cml file- Returns:
- the CMLResource loaded from the *.cml file
-
createCML
Creates a new CML model.- Parameters:
filepath
- the filepath where the *.cml file will be stored, in case the resource is saved/persisted- Returns:
- the new CMLResource (not yet persisted; you have to call save() on the resource)
-
createCML
Creates a new CML model.- Parameters:
cmlFile
- the file where the *.cml file will be stored, in case the resource is saved/persisted- Returns:
- the new CMLResource (not yet persisted; you have to call save() on the resource)
-
callGenerator
Calls a generator that produces output (Graphical Context Map, PlantUML, etc.) given a CML resource as input. This method generates all output files into the default directory "./src-gen".- Parameters:
cml
- the CML resource for which the generator shall be calledgenerator
- the generator that shall be called
-
callGenerator
void callGenerator(CMLResource cml, org.eclipse.xtext.generator.IGenerator2 generator, String outputDir) Calls a generator that produces output (Graphical Context Map, PlantUML, etc.) given a CML resource as input. This method allows to define the directory into which the output shall be generated (start with "./" and provide a directory relative to your execution home).- Parameters:
cml
- the CML resource for which the generator shall be calledgenerator
- the generator that shall be calledoutputDir
- the directory in which you want to generate the output (start with "./", relative to your execution directory)
-
applyRefactoring
Applies a refactoring (must be of type SemanticCMLRefactoring) on a CML model.- Parameters:
cml
- the model on which the refactoring shall be appliedrefactoring
- the refactoring that shall be applied
-