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

## Interface IModelManipulations

- All Known Implementing Classes:
    AbstractModelManipulations, ModelManipulationWithEditingDomain, SimpleModelManipulations

      public interface IModelManipulations

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.util.Collection<? extends java.lang.Object> element)` 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 reference, 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.
    `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.

- - ### Method Detail

    - #### create

          org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.resource.Resource res,
                                               org.eclipse.emf.ecore.EClass clazz)
                                        throws ModelManipulationException

      Creates an EObject and puts it as the root of the selected resource.
      Throws:
        `ModelManipulationException`

    - #### createChild

          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

      Creates an EObject and puts it into the selected reference of a container. The container reference must be a containment reference.
      Throws:
        `ModelManipulationException`

    - #### add

          void add(org.eclipse.emf.ecore.EObject container,
                   org.eclipse.emf.ecore.EStructuralFeature feature,
                   java.lang.Object element)
            throws ModelManipulationException

      Adds an existing element to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Throws:
        `ModelManipulationException`

    - #### add

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

      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.
      Throws:
        `ModelManipulationException`
      Since:
        1.2

    - #### add

          void add(org.eclipse.emf.ecore.EObject container,
                   org.eclipse.emf.ecore.EStructuralFeature reference,
                   java.util.Collection<? extends java.lang.Object> element)
            throws ModelManipulationException

      Adds a collection of existing elements to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Throws:
        `ModelManipulationException`

    - #### addTo

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

      Adds an existing element to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Throws:
        `ModelManipulationException`

    - #### addTo

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

      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.
      Throws:
        `ModelManipulationException`
      Since:
        1.2

    - #### addTo

          void addTo(org.eclipse.emf.ecore.EObject container,
                     org.eclipse.emf.ecore.EStructuralFeature reference,
                     java.util.Collection<? extends java.lang.Object> elements)
              throws ModelManipulationException

      Adds a collection of existing elements to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Throws:
        `ModelManipulationException`

    - #### set

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

      Sets an element to a selected 'single'-valued EStructuralFeature.
      Throws:
        `ModelManipulationException`

    - #### remove

          void remove(org.eclipse.emf.ecore.EObject object)
               throws ModelManipulationException

      Removes an object from the model.
      Throws:
        `ModelManipulationException`

    - #### remove

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

      Removes an element from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well.
      Throws:
        `ModelManipulationException`

    - #### remove

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

      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.
      Throws:
        `ModelManipulationException`
      Since:
        1.2

    - #### remove

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

      Removes all elements from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well.
      Throws:
        `ModelManipulationException`

    - #### moveTo

          void moveTo(org.eclipse.emf.ecore.EObject what,
                      org.eclipse.emf.ecore.resource.Resource newContainer)
               throws ModelManipulationException

      Moves an existing element into the root of the selected resource.
      Throws:
        `ModelManipulationException`

    - #### moveTo

          void moveTo(org.eclipse.emf.ecore.EObject what,
                      org.eclipse.emf.ecore.resource.Resource newContainer,
                      int index)
               throws ModelManipulationException

      Moves an existing element into the root of the selected resource at the specified index.
      Throws:
        `ModelManipulationException`
      Since:
        1.2

    - #### moveTo

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

      Moves an existing element into the selected containment reference of the selected EObject.
      Throws:
        `ModelManipulationException`

    - #### moveTo

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

      Moves an existing element into the selected containment reference of the selected EObject at the specified index.
      Throws:
        `ModelManipulationException`
      Since:
        1.2

    - #### moveTo

          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

      Moves a collection of existing elements into the selected containment reference of the selected EObject.
      Throws:
        `ModelManipulationException`

    - #### changeIndex

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

      Changes the index of an existing element in the selected feature of the selected EObject.
      Throws:
        `ModelManipulationException`
      Since:
        1.2