public abstract class AbstractModelManipulations extends java.lang.Object implements IModelManipulations
Modifier and Type | Field and Description |
---|---|
protected ViatraQueryEngine |
engine |
Constructor and Description |
---|
AbstractModelManipulations(ViatraQueryEngine engine) |
Modifier and Type | Method and Description |
---|---|
void |
add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.util.Collection<? extends java.lang.Object> elements)
Adds a collection of existing elements to a selected EStructuralFeature.
|
void |
add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
Adds an existing element to a selected EStructuralFeature.
|
void |
add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element,
int index)
Adds an existing element to a selected EStructuralFeature at the specified index.
|
void |
addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.util.Collection<? extends java.lang.Object> elements)
Adds a collection of existing elements to a selected EStructuralFeature.
|
void |
addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
Adds an existing element to a selected EStructuralFeature.
|
void |
addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element,
int index)
Adds an existing element to a selected EStructuralFeature at the specified index.
|
void |
changeIndex(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int oldIndex,
int newIndex)
Changes the index of an existing element in the selected feature of the selected EObject.
|
org.eclipse.emf.ecore.EObject |
create(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.emf.ecore.EClass clazz)
Creates an EObject and puts it as the root of the selected resource.
|
org.eclipse.emf.ecore.EObject |
createChild(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.ecore.EClass clazz)
Creates an EObject and puts it into the selected reference of a
container.
|
protected abstract void |
doAdd(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature reference,
java.util.Collection<? extends java.lang.Object> element) |
protected abstract void |
doAdd(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature reference,
java.lang.Object object,
int index) |
protected abstract void |
doChangeIndex(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int oldIndex,
int newIndex) |
protected abstract org.eclipse.emf.ecore.EObject |
doCreate(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.ecore.EClass clazz) |
protected abstract org.eclipse.emf.ecore.EObject |
doCreate(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.emf.ecore.EClass clazz) |
protected void |
doMoveTo(java.util.Collection<org.eclipse.emf.ecore.EObject> what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference) |
protected abstract void |
doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference) |
protected abstract void |
doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference,
int index) |
protected abstract void |
doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer) |
protected abstract void |
doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer,
int index) |
protected abstract void |
doRemove(org.eclipse.emf.ecore.EObject object)
Removes an element from the containment hierarchy
|
protected abstract void |
doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature reference) |
protected abstract void |
doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int index) |
protected abstract void |
doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
Remove a non-containment reference value
|
protected abstract void |
doSet(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value) |
protected NavigationHelper |
getBaseEMFIndex() |
void |
moveTo(java.util.Collection<org.eclipse.emf.ecore.EObject> what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference)
Moves a collection of existing elements into the selected containment reference of the selected EObject.
|
void |
moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference)
Moves an existing element into the selected containment reference of the selected EObject.
|
void |
moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference,
int index)
Moves an existing element into the selected containment reference of the selected EObject at the specified index.
|
void |
moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer)
Moves an existing element into the root of the selected resource.
|
void |
moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer,
int index)
Moves an existing element into the root of the selected resource at the specified index.
|
void |
remove(org.eclipse.emf.ecore.EObject object)
Removes an object from the model.
|
void |
remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature)
Removes all elements from the 'many'-valued reference; if the reference is a containment reference, the element
is removed from the model as well.
|
void |
remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int index)
Removes the element at the specified index from the 'many'-valued reference;
if the reference is a containment reference, the element is removed from the model as well.
|
void |
remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
Removes an element from the 'many'-valued reference; if the reference is a containment reference, the element is
removed from the model as well.
|
void |
set(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value)
Sets an element to a selected 'single'-valued EStructuralFeature.
|
protected final ViatraQueryEngine engine
public AbstractModelManipulations(ViatraQueryEngine engine)
protected NavigationHelper getBaseEMFIndex()
ViatraQueryRuntimeException
protected void doMoveTo(java.util.Collection<org.eclipse.emf.ecore.EObject> what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
ModelManipulationException
protected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer) throws ModelManipulationException
ModelManipulationException
protected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer, int index) throws ModelManipulationException
ModelManipulationException
protected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
ModelManipulationException
protected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference, int index) throws ModelManipulationException
ModelManipulationException
protected abstract void doRemove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
ModelManipulationException
protected abstract void doRemove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int index) throws ModelManipulationException
ModelManipulationException
protected abstract void doRemove(org.eclipse.emf.ecore.EObject object) throws ModelManipulationException
ModelManipulationException
protected abstract void doRemove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference) throws ModelManipulationException
ModelManipulationException
protected abstract void doAdd(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.util.Collection<? extends java.lang.Object> element) throws ModelManipulationException
ModelManipulationException
protected abstract void doAdd(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.lang.Object object, int index) throws ModelManipulationException
ModelManipulationException
protected abstract void doSet(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value) throws ModelManipulationException
ModelManipulationException
protected abstract org.eclipse.emf.ecore.EObject doCreate(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
ModelManipulationException
protected abstract org.eclipse.emf.ecore.EObject doCreate(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
ModelManipulationException
protected abstract void doChangeIndex(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex) throws ModelManipulationException
ModelManipulationException
public org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
IModelManipulations
create
in interface IModelManipulations
ModelManipulationException
public org.eclipse.emf.ecore.EObject createChild(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
IModelManipulations
createChild
in interface IModelManipulations
ModelManipulationException
public void add(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
IModelManipulations
add
in interface IModelManipulations
ModelManipulationException
public void addTo(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
IModelManipulations
addTo
in interface IModelManipulations
ModelManipulationException
public void add(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element, int index) throws ModelManipulationException
IModelManipulations
add
in interface IModelManipulations
ModelManipulationException
public void add(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.util.Collection<? extends java.lang.Object> elements) throws ModelManipulationException
IModelManipulations
add
in interface IModelManipulations
ModelManipulationException
public void addTo(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element, int index) throws ModelManipulationException
IModelManipulations
addTo
in interface IModelManipulations
ModelManipulationException
public void addTo(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.util.Collection<? extends java.lang.Object> elements) throws ModelManipulationException
IModelManipulations
addTo
in interface IModelManipulations
ModelManipulationException
public void set(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value) throws ModelManipulationException
IModelManipulations
set
in interface IModelManipulations
ModelManipulationException
public void remove(org.eclipse.emf.ecore.EObject object) throws ModelManipulationException
IModelManipulations
remove
in interface IModelManipulations
ModelManipulationException
public void remove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
IModelManipulations
remove
in interface IModelManipulations
ModelManipulationException
public void remove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int index) throws ModelManipulationException
IModelManipulations
remove
in interface IModelManipulations
ModelManipulationException
public void remove(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature) throws ModelManipulationException
IModelManipulations
remove
in interface IModelManipulations
ModelManipulationException
public void moveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer) throws ModelManipulationException
IModelManipulations
moveTo
in interface IModelManipulations
ModelManipulationException
public void moveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer, int index) throws ModelManipulationException
IModelManipulations
moveTo
in interface IModelManipulations
ModelManipulationException
public void moveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
IModelManipulations
moveTo
in interface IModelManipulations
ModelManipulationException
public void moveTo(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference, int index) throws ModelManipulationException
IModelManipulations
moveTo
in interface IModelManipulations
ModelManipulationException
public void moveTo(java.util.Collection<org.eclipse.emf.ecore.EObject> what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
IModelManipulations
moveTo
in interface IModelManipulations
ModelManipulationException
public void changeIndex(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex) throws ModelManipulationException
IModelManipulations
changeIndex
in interface IModelManipulations
ModelManipulationException