org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.tabular

## Class IndexHostManipulations<ModelObject>

- java.lang.Object
- - org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractEcoreManipulations<java.lang.Void,ModelObject>
  - - org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.tabular.IndexHostManipulations<ModelObject>

- All Implemented Interfaces:
    IEcoreManipulations<java.lang.Void,ModelObject>, IEcoreReadOperations<java.lang.Void,ModelObject>

      public abstract class IndexHostManipulations<ModelObject>
      extends AbstractEcoreManipulations<java.lang.Void,ModelObject>
      implements IEcoreReadOperations<java.lang.Void,ModelObject>

  Manipulates and reads an `EcoreIndexHost`.

  The ModelObject type parameter may be specialized to any surrogate key type in use, such as `String` or `Long`.

  Implementors must provide their respective facility for creating and deleting objects (surrogate keys), therefore the methods `doCreate(Void, EClass)` and `doCreate(Object, EReference, EClass)` are not implemented. To implement, use helpers `registerInstance(EClassifier, Object, ITableWriterUnary.Table)` and `addInternal(Object, EStructuralFeature, Object, ITableWriterBinary.Table, ITableWriterUnary.Table)`, as well as `initializeNewlyCreatedObject(Object, EClass)`.

  Limitations:

  - Currently, root containers are not represented (always null).
  - Ordered collections are not maintained or represented.
  - No treatment of opposites (incl. container features) yet.
  Since:
    2.1
  No Reference:
    This class is experimental with an unstable API, not recommended for general usage yet.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `IndexHostManipulations.FeatureKind`
    `protected static interface` | `IndexHostManipulations.Initializer<ModelObject>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static TupleMask` | `BIND_SOURCE`
    `protected static TupleMask` | `BIND_TARGET`
    `protected java.util.Map<org.eclipse.emf.ecore.EClass,IndexHostManipulations.Initializer<ModelObject>>` | `initializerActions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexHostManipulations(EcoreIndexHost host)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAllTo(ModelObject 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.
    `protected void` | `addInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object newValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable)` PRE: Previous containments are erased at this point, if adding to a containment feature.
    `void` | `addTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)` Adds an existing element to a selected EStructuralFeature.
    `void` | `addTo(ModelObject 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(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex)` Changes the position of an existing element in the selected feature of the selected model object.
    `protected java.util.List<org.eclipse.emf.ecore.EClass>` | `computeSubtypes(org.eclipse.emf.ecore.EClass superClass)`
    `int` | `count(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` Retrieves the number of values in a given feature slot of a given container model element.
    `ModelObject` | `create(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz)` Creates a model object and puts it as the root of the selected root container.
    `ModelObject` | `createChild(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz)` Creates a model object and puts it into the selected reference of a container.
    `protected java.util.Optional<org.eclipse.emf.ecore.EObject>` | `createTemplateInstance(org.eclipse.emf.ecore.EClass clazz)` Creates an (optional) vanila instance of the class to learn about the default values.
    `protected void` | `deleteWithAllDangling(ModelObject element)` Removes a model element from the model.
    `protected void` | `deleteWithOutgoing(ModelObject element)` Removes a model element from the model.
    `protected void` | `deleteWithOutgoingInternal(ModelObject element, org.eclipse.emf.ecore.EClass eClass)`
    `protected java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object>` | `determineDefaultValues(org.eclipse.emf.ecore.EClass clazz)` Called for each exact type at most once.
    `protected IndexHostManipulations.Initializer<ModelObject>` | `determineInitializationSequence(org.eclipse.emf.ecore.EClass clazz)` Called for each exact type at most once.
    `protected abstract ModelObject` | `doCreate(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz)`
    `protected abstract ModelObject` | `doCreate(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz)`
    `org.eclipse.emf.ecore.EClass` | `eClass(ModelObject element)` Queries the exact type of the given object.
    `protected org.eclipse.emf.ecore.EClass` | `findExactType(ModelObject element)` Implementors may override this with a more efficient lookup.
    `protected java.lang.Iterable<org.eclipse.emf.ecore.EClass>` | `getAllClassTypes()`
    `protected java.util.List<org.eclipse.emf.ecore.EClass>` | `getAllClassTypesThatExtend(org.eclipse.emf.ecore.EClass superClass)` PRE: superClass is not EObject
    `protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>>` | `getAllCrossrefsPossiblyIncoming(org.eclipse.emf.ecore.EClass eClass)`
    `protected java.lang.Iterable<org.eclipse.emf.ecore.EStructuralFeature>` | `getAllPossibleFeatures(org.eclipse.emf.ecore.EClass exactType)`
    `protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>>` | `getAllRefsPossiblyContaining(org.eclipse.emf.ecore.EClass eClass)`
    `protected void` | `initializeNewlyCreatedObject(ModelObject instance, org.eclipse.emf.ecore.EClass clazz)` Initializes a newly created object to its default state.
    `protected boolean` | `isAssignableFrom(org.eclipse.emf.ecore.EClassifier classifier, java.lang.Object element)`
    `protected boolean` | `isAssignableFrom(org.eclipse.emf.ecore.EClass superClass, ModelObject element)`
    `boolean` | `isSetTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` Returns whether the given value is listed among the values in a given feature slot of a given container model element.
    `protected IndexHostManipulations.Initializer<ModelObject>` | `makeInitializer(java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> defaultValues)` Constructs an initializer that sets attributes of the model object to the given default values.
    `protected void` | `moveAllInternal(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)`
    `void` | `moveAllTo(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)` Moves a collection of existing elements into the selected containment reference of the selected model object.
    `protected void` | `moveInternal(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)`
    `void` | `moveTo(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)` Moves an existing element into the selected containment reference of the selected model object.
    `void` | `moveTo(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference, int index)` Moves an existing element into the selected containment reference of the selected model object at the specified index.
    `void` | `moveTo(ModelObject what, java.lang.Void newContainer)` Moves an existing element into the root of the selected root container.
    `void` | `moveTo(ModelObject what, java.lang.Void newContainer, int index)` Moves an existing element into the root of the selected root container at the specified index.
    `protected void` | `registerInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object newValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)` Registers an instance of a classifier.
    `void` | `remove(ModelObject object)` Removes an object from the model, along with all contained objects, and any incoming or outgoing references.
    `void` | `remove(ModelObject 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 (it is assumed that no dangling cross-references point to it).
    `void` | `remove(ModelObject 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 (it is assumed that no dangling cross-references point to it).
    `void` | `remove(ModelObject 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 (it is assumed that no dangling cross-references point to it).
    `protected void` | `removeAllOfInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)`
    `protected void` | `removeFromCurrentContainer(ModelObject value)` The implementation must: remove the containment reference pointing to this element, if it exists.
    `protected void` | `removeFromCurrentContainer(ModelObject value, org.eclipse.emf.ecore.EClass eClass)`
    `protected void` | `removeInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object oldValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable)`
    `void` | `set(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` Sets a 'single'-valued EStructuralFeature of a given container model element to the given value.
    `protected void` | `setInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)`
    `java.util.stream.Stream<? extends java.lang.Object>` | `stream(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` Retrieves all values in a given feature slot of a given container model element.
    `protected void` | `unregisterInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object oldValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)` Unregisters an instance of a classifier.

    - ### Methods inherited from class org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractEcoreManipulations

      `isEObjectClass`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.IEcoreManipulations

      `add, add, addAll`

- - ### Field Detail

    - #### BIND_SOURCE

          protected static final TupleMask BIND_SOURCE

    - #### BIND_TARGET

          protected static final TupleMask BIND_TARGET

    - #### initializerActions

          protected java.util.Map<org.eclipse.emf.ecore.EClass,IndexHostManipulations.Initializer<ModelObject>> initializerActions

  - ### Constructor Detail

    - #### IndexHostManipulations

          public IndexHostManipulations(EcoreIndexHost host)

  - ### Method Detail

    - #### eClass

          public org.eclipse.emf.ecore.EClass eClass(ModelObject element)
                                              throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Queries the exact type of the given object.
      Specified by:
        `eClass` in interface `IEcoreReadOperations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### findExactType

          protected org.eclipse.emf.ecore.EClass findExactType(ModelObject element)
                                                        throws ModelManipulationException

      Implementors may override this with a more efficient lookup.
      Throws:
        `ModelManipulationException`

    - #### isAssignableFrom

          protected boolean isAssignableFrom(org.eclipse.emf.ecore.EClass superClass,
                                             ModelObject element)

    - #### isAssignableFrom

          protected boolean isAssignableFrom(org.eclipse.emf.ecore.EClassifier classifier,
                                             java.lang.Object element)

    - #### getAllClassTypes

          protected java.lang.Iterable<org.eclipse.emf.ecore.EClass> getAllClassTypes()

    - #### getAllClassTypesThatExtend

          protected java.util.List<org.eclipse.emf.ecore.EClass> getAllClassTypesThatExtend(org.eclipse.emf.ecore.EClass superClass)

      PRE: superClass is not EObject

    - #### computeSubtypes

          protected java.util.List<org.eclipse.emf.ecore.EClass> computeSubtypes(org.eclipse.emf.ecore.EClass superClass)

    - #### count

          public int count(ModelObject container,
                           org.eclipse.emf.ecore.EStructuralFeature feature)
                    throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Retrieves the number of values in a given feature slot of a given container model element.
      Specified by:
        `count` in interface `IEcoreReadOperations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### stream

          public java.util.stream.Stream<? extends java.lang.Object> stream(ModelObject container,
                                                                            org.eclipse.emf.ecore.EStructuralFeature feature)
                                                                     throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Retrieves all values in a given feature slot of a given container model element.
      Specified by:
        `stream` in interface `IEcoreReadOperations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### isSetTo

          public boolean isSetTo(ModelObject container,
                                 org.eclipse.emf.ecore.EStructuralFeature feature,
                                 java.lang.Object value)
                          throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Returns whether the given value is listed among the values in a given feature slot of a given container model element.
      Specified by:
        `isSetTo` in interface `IEcoreReadOperations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### create

          public ModelObject create(java.lang.Void res,
                                    org.eclipse.emf.ecore.EClass clazz)
                             throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Creates a model object and puts it as the root of the selected root container.
      Specified by:
        `create` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### doCreate

          protected abstract ModelObject doCreate(java.lang.Void res,
                                                  org.eclipse.emf.ecore.EClass clazz)
                                           throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### createChild

          public ModelObject createChild(ModelObject container,
                                         org.eclipse.emf.ecore.EReference reference,
                                         org.eclipse.emf.ecore.EClass clazz)
                                  throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Creates a model object and puts it into the selected reference of a container. The container reference must be a containment reference.
      Specified by:
        `createChild` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### doCreate

          protected abstract ModelObject doCreate(ModelObject container,
                                                  org.eclipse.emf.ecore.EReference reference,
                                                  org.eclipse.emf.ecore.EClass clazz)
                                           throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### deleteWithOutgoing

          protected void deleteWithOutgoing(ModelObject element)
                                     throws ModelManipulationException

      Removes a model element from the model.

      An efficient implementation shall:

      - discover the type of the deleted element
      - remove the element from the unary table corresponding to the type (use `unregisterInstance(EClassifier, Object, ITableWriterUnary.Table)`),
      - as well as recursively remove any contained objects and assigned features.
      Parameters:
        `element` - the model element to delete from the model
      Throws:
        `ModelManipulationException`

    - #### deleteWithOutgoingInternal

          protected void deleteWithOutgoingInternal(ModelObject element,
                                                    org.eclipse.emf.ecore.EClass eClass)
                                             throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### deleteWithAllDangling

          protected void deleteWithAllDangling(ModelObject element)
                                        throws ModelManipulationException

      Removes a model element from the model.

      The implementation must:

      - perform everything that `deleteWithOutgoing(Object)` does, as well as
      - remove any containment or cross-references pointing to this element.
      Parameters:
        `element` - the model element to delete from the model
      Throws:
        `ModelManipulationException`

    - #### removeFromCurrentContainer

          protected void removeFromCurrentContainer(ModelObject value)
                                             throws ModelManipulationException

      The implementation must:

      - remove the containment reference pointing to this element, if it exists.
      Throws:
        `ModelManipulationException`

    - #### removeFromCurrentContainer

          protected void removeFromCurrentContainer(ModelObject value,
                                                    org.eclipse.emf.ecore.EClass eClass)

    - #### getAllRefsPossiblyContaining

          protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>> getAllRefsPossiblyContaining(org.eclipse.emf.ecore.EClass eClass)

    - #### getAllCrossrefsPossiblyIncoming

          protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>> getAllCrossrefsPossiblyIncoming(org.eclipse.emf.ecore.EClass eClass)

    - #### getAllPossibleFeatures

          protected java.lang.Iterable<org.eclipse.emf.ecore.EStructuralFeature> getAllPossibleFeatures(org.eclipse.emf.ecore.EClass exactType)

    - #### unregisterInstance

          protected void unregisterInstance(org.eclipse.emf.ecore.EClassifier type,
                                            java.lang.Object oldValue,
                                            ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)

      Unregisters an instance of a classifier.
      Parameters:
        `feature` -
        `oldValue` -
        `instanceTableOptional` - can be null, in which case the table is looked up based on the type

    - #### registerInstance

          protected void registerInstance(org.eclipse.emf.ecore.EClassifier type,
                                          java.lang.Object newValue,
                                          ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)

      Registers an instance of a classifier.
      Parameters:
        `feature` -
        `newValue` -
        `instanceTableOptional` - can be null, in which case the table is looked up based on the type

    - #### initializeNewlyCreatedObject

          protected void initializeNewlyCreatedObject(ModelObject instance,
                                                      org.eclipse.emf.ecore.EClass clazz)
                                               throws ModelManipulationException

      Initializes a newly created object to its default state. While it is possible to customize this method directly, overriding `determineInitializationSequence(EClass)` or `determineDefaultValues(EClass)`.
      Throws:
        `ModelManipulationException`

    - #### determineInitializationSequence

          protected IndexHostManipulations.Initializer<ModelObject> determineInitializationSequence(org.eclipse.emf.ecore.EClass clazz)

      Called for each exact type at most once. Computes the initalization steps that will be performed for each instance of the class.

      The default implementation derives the necessary steps from the default values of attributes. Feel free to override with domain-specific initialization steps, such as setting key attributes to uniquely generated values.

    - #### determineDefaultValues

          protected java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> determineDefaultValues(org.eclipse.emf.ecore.EClass clazz)

      Called for each exact type at most once. Computes the default values of attributes, wherever non-derived and different from the datatype default.

      The default implementation derives the defaults from a template instance initialized by the `EFactory`.. Feel free to override with domain-specific initialization steps, or override `determineInitializationSequence(EClass)` for larger flexibility.

    - #### createTemplateInstance

          protected java.util.Optional<org.eclipse.emf.ecore.EObject> createTemplateInstance(org.eclipse.emf.ecore.EClass clazz)

      Creates an (optional) vanila instance of the class to learn about the default values. May fail, or may be overridden to omit the template creation.
      Returns:
        null if creation is unsuccessful or undesired

    - #### makeInitializer

          protected IndexHostManipulations.Initializer<ModelObject> makeInitializer(java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> defaultValues)

      Constructs an initializer that sets attributes of the model object to the given default values.

    - #### removeInternal

          protected void removeInternal(ModelObject container,
                                        org.eclipse.emf.ecore.EStructuralFeature feature,
                                        java.lang.Object oldValue,
                                        ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable,
                                        ITableWriterUnary.Table<java.lang.Object> instanceTable)
                                 throws ModelManipulationException

      Parameters:
        `featureTable` - optional, can be supplied if known; will be looked up based on feature if null is supplied
        `instanceTable` - optional, can be supplied if known; will be looked up based on feature if null is supplied
      Throws:
        `ModelManipulationException`

    - #### addInternal

          protected void addInternal(ModelObject container,
                                     org.eclipse.emf.ecore.EStructuralFeature feature,
                                     java.lang.Object newValue,
                                     ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable,
                                     ITableWriterUnary.Table<java.lang.Object> instanceTable)

      PRE: Previous containments are erased at this point, if adding to a containment feature. This is required to avoid double containment.
      Parameters:
        `featureTable` - optional, can be supplied if known; will be looked up based on feature if null is supplied
        `instanceTable` - optional, can be supplied if known; will be looked up based on feature if null is supplied

    - #### addTo

          public void addTo(ModelObject container,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.lang.Object element)
                     throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Adds an existing element to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### addTo

          public void addTo(ModelObject container,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.lang.Object element,
                            int index)
                     throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Adds an existing element to a selected EStructuralFeature at the specified index. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### addAllTo

          public void addAllTo(ModelObject container,
                               org.eclipse.emf.ecore.EStructuralFeature feature,
                               java.util.Collection<? extends java.lang.Object> elements)
                        throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Adds a collection of existing elements to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addAllTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### set

          public void set(ModelObject container,
                          org.eclipse.emf.ecore.EStructuralFeature feature,
                          java.lang.Object value)
                   throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Sets a 'single'-valued EStructuralFeature of a given container model element to the given value.

      The previous value of the feature, if any, is removed. If the provided new value is null, then the invocation acts as 'unset', and no new value is stored.

      Specified by:
        `set` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
        `value` - the new value to be set, or null

        TODO restrict to non-containment?

      Throws:
        `ModelManipulationException`

    - #### setInternal

          protected void setInternal(ModelObject container,
                                     org.eclipse.emf.ecore.EStructuralFeature feature,
                                     java.lang.Object value)
                              throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove(ModelObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             java.lang.Object element)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Removes an element from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well (it is assumed that no dangling cross-references point to it).
      Specified by:
        `remove` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove(ModelObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      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 (it is assumed that no dangling cross-references point to it).
      Specified by:
        `remove` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove(ModelObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Removes all elements from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well (it is assumed that no dangling cross-references point to it).
      Specified by:
        `remove` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### removeAllOfInternal

          protected void removeAllOfInternal(ModelObject container,
                                             org.eclipse.emf.ecore.EStructuralFeature feature)
                                      throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove(ModelObject object)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Removes an object from the model, along with all contained objects, and any incoming or outgoing references.
      Specified by:
        `remove` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo(ModelObject what,
                             java.lang.Void newContainer)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the root of the selected root container.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo(ModelObject what,
                             java.lang.Void newContainer,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the root of the selected root container at the specified index.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo(ModelObject what,
                             ModelObject newContainer,
                             org.eclipse.emf.ecore.EReference reference)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the selected containment reference of the selected model object.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveInternal

          protected void moveInternal(ModelObject what,
                                      ModelObject newContainer,
                                      org.eclipse.emf.ecore.EReference reference)
                               throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo(ModelObject what,
                             ModelObject newContainer,
                             org.eclipse.emf.ecore.EReference reference,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the selected containment reference of the selected model object at the specified index.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveAllTo

          public void moveAllTo(java.util.Collection<ModelObject> what,
                                ModelObject newContainer,
                                org.eclipse.emf.ecore.EReference reference)
                         throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves a collection of existing elements into the selected containment reference of the selected model object.
      Specified by:
        `moveAllTo` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`

    - #### moveAllInternal

          protected void moveAllInternal(java.util.Collection<ModelObject> what,
                                         ModelObject newContainer,
                                         org.eclipse.emf.ecore.EReference reference)
                                  throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### changeIndex

          public void changeIndex(ModelObject container,
                                  org.eclipse.emf.ecore.EStructuralFeature feature,
                                  int oldIndex,
                                  int newIndex)
                           throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Changes the position of an existing element in the selected feature of the selected model object.
      Specified by:
        `changeIndex` in interface `IEcoreManipulations<java.lang.Void,ModelObject>`
      Throws:
        `ModelManipulationException`