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() throws ViatraQueryException
ViatraQueryExceptionprotected 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
ModelManipulationExceptionprotected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer,
int index)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doMoveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference)
throws ModelManipulationException
ModelManipulationExceptionprotected 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
ModelManipulationExceptionprotected abstract void doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int index)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doRemove(org.eclipse.emf.ecore.EObject object)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doRemove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature reference)
throws ModelManipulationException
ModelManipulationExceptionprotected 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
ModelManipulationExceptionprotected abstract void doAdd(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature reference,
java.lang.Object object,
int index)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doSet(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value)
throws ModelManipulationException
ModelManipulationExceptionprotected 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
ModelManipulationExceptionprotected abstract org.eclipse.emf.ecore.EObject doCreate(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.emf.ecore.EClass clazz)
throws ModelManipulationException
ModelManipulationExceptionprotected abstract void doChangeIndex(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int oldIndex,
int newIndex)
throws ModelManipulationException
ModelManipulationExceptionpublic org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.emf.ecore.EClass clazz)
throws ModelManipulationException
IModelManipulationscreate in interface IModelManipulationsModelManipulationExceptionpublic 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
IModelManipulationscreateChild in interface IModelManipulationsModelManipulationExceptionpublic void add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
throws ModelManipulationException
IModelManipulationsadd in interface IModelManipulationsModelManipulationExceptionpublic void addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
throws ModelManipulationException
IModelManipulationsaddTo in interface IModelManipulationsModelManipulationExceptionpublic void add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element,
int index)
throws ModelManipulationException
IModelManipulationsadd in interface IModelManipulationsModelManipulationExceptionpublic void add(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.util.Collection<? extends java.lang.Object> elements)
throws ModelManipulationException
IModelManipulationsadd in interface IModelManipulationsModelManipulationExceptionpublic void addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element,
int index)
throws ModelManipulationException
IModelManipulationsaddTo in interface IModelManipulationsModelManipulationExceptionpublic void addTo(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.util.Collection<? extends java.lang.Object> elements)
throws ModelManipulationException
IModelManipulationsaddTo in interface IModelManipulationsModelManipulationExceptionpublic void set(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value)
throws ModelManipulationException
IModelManipulationsset in interface IModelManipulationsModelManipulationExceptionpublic void remove(org.eclipse.emf.ecore.EObject object)
throws ModelManipulationException
IModelManipulationsremove in interface IModelManipulationsModelManipulationExceptionpublic void remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object element)
throws ModelManipulationException
IModelManipulationsremove in interface IModelManipulationsModelManipulationExceptionpublic void remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int index)
throws ModelManipulationException
IModelManipulationsremove in interface IModelManipulationsModelManipulationExceptionpublic void remove(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature)
throws ModelManipulationException
IModelManipulationsremove in interface IModelManipulationsModelManipulationExceptionpublic void moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer)
throws ModelManipulationException
IModelManipulationsmoveTo in interface IModelManipulationsModelManipulationExceptionpublic void moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.resource.Resource newContainer,
int index)
throws ModelManipulationException
IModelManipulationsmoveTo in interface IModelManipulationsModelManipulationExceptionpublic void moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference)
throws ModelManipulationException
IModelManipulationsmoveTo in interface IModelManipulationsModelManipulationExceptionpublic void moveTo(org.eclipse.emf.ecore.EObject what,
org.eclipse.emf.ecore.EObject newContainer,
org.eclipse.emf.ecore.EReference reference,
int index)
throws ModelManipulationException
IModelManipulationsmoveTo in interface IModelManipulationsModelManipulationExceptionpublic 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
IModelManipulationsmoveTo in interface IModelManipulationsModelManipulationExceptionpublic void changeIndex(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EStructuralFeature feature,
int oldIndex,
int newIndex)
throws ModelManipulationException
IModelManipulationschangeIndex in interface IModelManipulationsModelManipulationException