public class SolutionTrajectory
extends java.lang.Object
It is also possible to undo the transformation if initialized with an editing domain.
The instance of this class can be reused for different models.
| Constructor and Description |
|---|
SolutionTrajectory(java.util.List<java.lang.Object> activationCodes,
java.util.List<BatchTransformationRule<?,?>> transformationRules,
IStateCoderFactory stateCoderFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doNextTransformation()
Transforms the given model by one step to the solution (makes one step in the trajectory).
|
void |
doTransformation()
Transforms the given model along the trajectory.
|
void |
doTransformation(org.eclipse.emf.common.notify.Notifier modelRoot)
Transforms the given model along the trajectory.
|
void |
doTransformationUndoable(org.eclipse.emf.common.notify.Notifier modelRoot)
Transforms the given model along the trajectory.
|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.Object> |
getActivationCodes() |
int |
getCurrentIndex() |
ViatraQueryEngine |
getEngine() |
Fitness |
getFitness() |
org.eclipse.emf.common.notify.Notifier |
getModel() |
Solution |
getSolution() |
IStateCoder |
getStateCoder() |
IStateCoderFactory |
getStateCoderFactory() |
int |
getTrajectoryLength() |
java.util.List<BatchTransformationRule<?,?>> |
getTransformationRules() |
int |
hashCode() |
void |
setFitness(Fitness fitness) |
void |
setModel(org.eclipse.emf.common.notify.Notifier model)
Initialize this SolutionTrajectory for transforming the model along the trajectory.
|
void |
setModelWithEditingDomain(org.eclipse.emf.common.notify.Notifier modelRoot)
Initialize this SolutionTrajectory for transforming the given model along the trajectory.
|
void |
setSolution(Solution solution) |
java.lang.String |
toPrettyString() |
boolean |
undoLastTransformation()
Call this method to undo the last transformation.
|
void |
undoTransformation()
Call this method to undo the transformation.
|
public SolutionTrajectory(java.util.List<java.lang.Object> activationCodes,
java.util.List<BatchTransformationRule<?,?>> transformationRules,
IStateCoderFactory stateCoderFactory)
public void setModel(org.eclipse.emf.common.notify.Notifier model)
throws ViatraQueryException
model - The model.ViatraQueryException - If the VIATRA Query fails to initialize.public void setModelWithEditingDomain(org.eclipse.emf.common.notify.Notifier modelRoot)
throws ViatraQueryException
The transformation will be reversible by creating an EditingDomain on the model.
modelRoot - The root of the model.ViatraQueryException - If the VIATRA Query fails to initialize.public void doTransformation(org.eclipse.emf.common.notify.Notifier modelRoot)
throws ViatraQueryException
modelRoot - The root of the model.ViatraQueryException - If the VIATRA Query fails to initialize.public void doTransformationUndoable(org.eclipse.emf.common.notify.Notifier modelRoot)
throws ViatraQueryException
The transformation will be reversible by creating an EditingDomain on the model.
modelRoot - The root of the model.ViatraQueryException - If the VIATRA Query fails to initialize.public void doTransformation()
throws ViatraQueryException
setModel(Notifier) method.java.lang.Exception - If the activation to fire is not found. Possible problems: wrong model, bad state serializer.ViatraQueryException - If the VIATRA Query fails to initialize.public boolean doNextTransformation()
throws ViatraQueryException
setModel(Notifier) method.ViatraQueryExceptionpublic boolean undoLastTransformation()
public void undoTransformation()
public java.util.List<java.lang.Object> getActivationCodes()
public java.util.List<BatchTransformationRule<?,?>> getTransformationRules()
public IStateCoderFactory getStateCoderFactory()
public ViatraQueryEngine getEngine()
public org.eclipse.emf.common.notify.Notifier getModel()
public IStateCoder getStateCoder()
public int getCurrentIndex()
public int getTrajectoryLength()
public Fitness getFitness()
public void setFitness(Fitness fitness)
public java.lang.String toPrettyString()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Solution getSolution()
public void setSolution(Solution solution)