Package org.contextmapper.dsl.generator
Class NewServiceCutContextMapGenerator
- java.lang.Object
-
- org.eclipse.xtext.generator.AbstractGenerator
-
- org.contextmapper.dsl.generator.AbstractContextMapGenerator
-
- org.contextmapper.dsl.generator.NewServiceCutContextMapGenerator
-
- All Implemented Interfaces:
org.eclipse.xtext.generator.IGenerator2
public class NewServiceCutContextMapGenerator extends AbstractContextMapGenerator
Uses the Service Cutter engine to calculate a new Service Cut. The new cut is translated back into a new Context Map. Use this class to generate new Context Maps on the basis of Service Cutter.
-
-
Field Summary
-
Fields inherited from class org.contextmapper.dsl.generator.AbstractContextMapGenerator
contextMappingModel, resourceSet
-
-
Constructor Summary
Constructors Constructor Description NewServiceCutContextMapGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkPreconditions(ContextMappingModel model)
protected void
generateFromContextMap(ContextMap contextMap, org.eclipse.xtext.generator.IFileSystemAccess2 fsa, org.eclipse.emf.common.util.URI inputFileURI)
NewServiceCutContextMapGenerator
setSolverConfiguration(ch.hsr.servicecutter.solver.SolverConfiguration solverConfiguration)
Sets a customSolverConfiguration
.NewServiceCutContextMapGenerator
setUserRepresentationContainer(ch.hsr.servicecutter.api.model.UserRepresentationContainer userRepresentationContainer)
Sets the user representations for the Service Cutter solver.-
Methods inherited from class org.contextmapper.dsl.generator.AbstractContextMapGenerator
doGenerate
-
-
-
-
Method Detail
-
setSolverConfiguration
public NewServiceCutContextMapGenerator setSolverConfiguration(ch.hsr.servicecutter.solver.SolverConfiguration solverConfiguration)
Sets a customSolverConfiguration
. If not called, a default configuration will be created.- Parameters:
solverConfiguration
- theSolverConfiguration
to be used to create the service cut.
-
setUserRepresentationContainer
public NewServiceCutContextMapGenerator setUserRepresentationContainer(ch.hsr.servicecutter.api.model.UserRepresentationContainer userRepresentationContainer)
Sets the user representations for the Service Cutter solver.- Parameters:
userRepresentationContainer
- the container with the user representations
-
generateFromContextMap
protected void generateFromContextMap(ContextMap contextMap, org.eclipse.xtext.generator.IFileSystemAccess2 fsa, org.eclipse.emf.common.util.URI inputFileURI)
- Specified by:
generateFromContextMap
in classAbstractContextMapGenerator
-
checkPreconditions
public void checkPreconditions(ContextMappingModel model)
-
-