org.eclipse.emf.emfstore.modelmutator
Class ESModelMutatorConfiguration

java.lang.Object
  extended by org.eclipse.emf.emfstore.modelmutator.ESModelMutatorConfiguration

public class ESModelMutatorConfiguration
extends Object

Configuration for the ModelMutator.

Since:
2.0
Author:
Eugen Neufeld, Stephan Koehler, Philip Achenbach, Julian Sommerfeldt

Constructor Summary
ESModelMutatorConfiguration()
          Initialize variables with null.
ESModelMutatorConfiguration(Collection<org.eclipse.emf.ecore.EPackage> modelPackages, org.eclipse.emf.ecore.EObject rootEObject, Long seed)
          The constructor for the configuration.
ESModelMutatorConfiguration(org.eclipse.emf.ecore.EPackage modelPackage, org.eclipse.emf.ecore.EObject rootEObject, Long seed)
          The constructor for the configuration.
 
Method Summary
 Collection<org.eclipse.emf.ecore.EClass> geteClassesToIgnore()
           
 org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
           
 Collection<org.eclipse.emf.ecore.EStructuralFeature> geteStructuralFeaturesToIgnore()
           
 Set<RuntimeException> getExceptionLog()
           
 int getMaxDeleteCount()
           
 int getMinObjectsCount()
           
 Collection<org.eclipse.emf.ecore.EPackage> getModelPackages()
           
 int getMutationCount()
          Returns the number of mutations to be performed.
 Random getRandom()
           
 org.eclipse.emf.ecore.EObject getRootEObject()
           
 boolean isAllowDuplicateIDs()
          Specifies whether the model generation or mutation are allowed to add non-unique values in ID attributes.
 boolean isDoNotGenerateRoot()
           
 boolean isIgnoreAndLog()
           
 boolean isUseEcoreUtilDelete()
           
 void reset()
          Reset the ESModelMutatorConfiguration.
 void setAllowDuplicateIDs(boolean allowDuplicateIDs)
          Sets whether the model generation or mutation should be allowed to add non-unique values in ID attributes.
 void setDoNotGenerateRoot(boolean doNotGenerateRoot)
           
 void seteClassesToIgnore(Collection<org.eclipse.emf.ecore.EClass> eClassesToIgnore)
           
 void setEditingDomain(org.eclipse.emf.edit.domain.EditingDomain editingDomain)
           
 void seteStructuralFeaturesToIgnore(Collection<org.eclipse.emf.ecore.EStructuralFeature> eStructuralFeaturesToIgnore)
           
 void setExceptionLog(Set<RuntimeException> exceptionLog)
           
 void setIgnoreAndLog(boolean ignoreAndLog)
           
 void setMaxDeleteCount(Integer maxDeleteCount)
           
 void setMinObjectsCount(int minObjectsCount)
           
 void setModelPackages(Collection<org.eclipse.emf.ecore.EPackage> modelPackages)
           
 void setMutationCount(Integer mutationCount)
          Sets the number of mutations to be performed.
 void setRootEObject(org.eclipse.emf.ecore.EObject rootEObject)
           
 void setSeed(Long seed)
           
 void setUseEcoreUtilDelete(boolean useEcoreUtilDelete)
          Should the Mutator use EcoreUtil.delete(EObject)?
NOTE: This is a very expensive method and will decrease the performance dramatically.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESModelMutatorConfiguration

public ESModelMutatorConfiguration()
Initialize variables with null. Variables have to be set later!


ESModelMutatorConfiguration

public ESModelMutatorConfiguration(org.eclipse.emf.ecore.EPackage modelPackage,
                                   org.eclipse.emf.ecore.EObject rootEObject,
                                   Long seed)
The constructor for the configuration.

Parameters:
modelPackage - the EPackages
rootEObject - the rootObject for the generation/change
seed - the seed for the generation/change

ESModelMutatorConfiguration

public ESModelMutatorConfiguration(Collection<org.eclipse.emf.ecore.EPackage> modelPackages,
                                   org.eclipse.emf.ecore.EObject rootEObject,
                                   Long seed)
The constructor for the configuration.

Parameters:
modelPackages - the EPackages
rootEObject - the rootObject for the generation/change
seed - the seed for the generation/change
Method Detail

reset

public void reset()
Reset the ESModelMutatorConfiguration. Means that it has the same state after the first initialization.


setModelPackages

public void setModelPackages(Collection<org.eclipse.emf.ecore.EPackage> modelPackages)
Parameters:
modelPackages - the EPackages

setRootEObject

public void setRootEObject(org.eclipse.emf.ecore.EObject rootEObject)
Parameters:
rootEObject - the rootObject for the generation/change

setSeed

public void setSeed(Long seed)
Parameters:
seed - The seed for the random.

getMinObjectsCount

public int getMinObjectsCount()
Returns:
The minimum number of objects to generate.

setMinObjectsCount

public void setMinObjectsCount(int minObjectsCount)
Parameters:
minObjectsCount - The minimum number of objects to generate.

isIgnoreAndLog

public boolean isIgnoreAndLog()
Returns:
the ignoreAndLog

setIgnoreAndLog

public void setIgnoreAndLog(boolean ignoreAndLog)
Parameters:
ignoreAndLog - the ignoreAndLog to set

geteClassesToIgnore

public Collection<org.eclipse.emf.ecore.EClass> geteClassesToIgnore()
Returns:
the eClassesToIgnore

seteClassesToIgnore

public void seteClassesToIgnore(Collection<org.eclipse.emf.ecore.EClass> eClassesToIgnore)
Parameters:
eClassesToIgnore - the eClassesToIgnore to set

getModelPackages

public Collection<org.eclipse.emf.ecore.EPackage> getModelPackages()
Returns:
the modelPackage

getRootEObject

public org.eclipse.emf.ecore.EObject getRootEObject()
Returns:
the rootEObject

getExceptionLog

public Set<RuntimeException> getExceptionLog()
Returns:
the exceptionLog

setExceptionLog

public void setExceptionLog(Set<RuntimeException> exceptionLog)
Parameters:
exceptionLog - the exceptionLog to set

getRandom

public Random getRandom()
Returns:
the random

geteStructuralFeaturesToIgnore

public Collection<org.eclipse.emf.ecore.EStructuralFeature> geteStructuralFeaturesToIgnore()
Returns:
the eStructuralFeaturesToIgnore

seteStructuralFeaturesToIgnore

public void seteStructuralFeaturesToIgnore(Collection<org.eclipse.emf.ecore.EStructuralFeature> eStructuralFeaturesToIgnore)
Parameters:
eStructuralFeaturesToIgnore - the eStructuralFeaturesToIgnore to set

isDoNotGenerateRoot

public boolean isDoNotGenerateRoot()
Returns:
the doNotGenerateRoot

setDoNotGenerateRoot

public void setDoNotGenerateRoot(boolean doNotGenerateRoot)
Parameters:
doNotGenerateRoot - the doNotGenerateRoot to set

getEditingDomain

public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
Returns:
The EditingDomain specified in the config.

setEditingDomain

public void setEditingDomain(org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Parameters:
editingDomain - The EditingDomain to use by commands.

isUseEcoreUtilDelete

public boolean isUseEcoreUtilDelete()
Returns:
Should the Mutator use EcoreUtil.delete(EObject)?

setUseEcoreUtilDelete

public void setUseEcoreUtilDelete(boolean useEcoreUtilDelete)
Should the Mutator use EcoreUtil.delete(EObject)?
NOTE: This is a very expensive method and will decrease the performance dramatically.

Parameters:
useEcoreUtilDelete - Should the Mutator use EcoreUtil.delete(EObject)?

getMaxDeleteCount

public int getMaxDeleteCount()
Returns:
How many objects should the mutation process delete maximal?

setMaxDeleteCount

public void setMaxDeleteCount(Integer maxDeleteCount)
Parameters:
maxDeleteCount - How many objects should the mutation process delete maximal?

getMutationCount

public int getMutationCount()
Returns the number of mutations to be performed.

Returns:
the number of mutations

setMutationCount

public void setMutationCount(Integer mutationCount)
Sets the number of mutations to be performed.

Parameters:
mutationCount - the number of mutations to set

isAllowDuplicateIDs

public boolean isAllowDuplicateIDs()
Specifies whether the model generation or mutation are allowed to add non-unique values in ID attributes.

Returns:
true if duplicate IDs are allowed, false otherwise.

setAllowDuplicateIDs

public void setAllowDuplicateIDs(boolean allowDuplicateIDs)
Sets whether the model generation or mutation should be allowed to add non-unique values in ID attributes.

Parameters:
allowDuplicateIDs - Should the model generator and mutator be allowed to add non-unique values in ID attributes?


Copyright © 2015. All Rights Reserved.