Class EMFReferenceModel

java.lang.Object
org.eclipse.m2m.atl.core.emf.EMFModel
org.eclipse.m2m.atl.core.emf.EMFReferenceModel
All Implemented Interfaces:
IModel, IReferenceModel

public class EMFReferenceModel extends EMFModel implements IReferenceModel
The EMF implementation of IReferenceModel.
  • Constructor Details

  • Method Details

    • getMetaElementByName

      public Object getMetaElementByName(String name)
      Returns the metaelement having the given name.
      Specified by:
      getMetaElementByName in interface IReferenceModel
      Parameters:
      name - the given name
      Returns:
      the metaelement having the given name
      See Also:
    • isModelOf

      public boolean isModelOf(Object object)
      Returns true if the given object is contained in this model's resource or a referenced resource.
      Specified by:
      isModelOf in interface IModel
      Overrides:
      isModelOf in class EMFModel
      Parameters:
      object - the model element
      Returns:
      true if object is contained in this model's resource or a referenced resource
      See Also:
    • getAllElementsByType

      public Set<org.eclipse.emf.ecore.EObject> getAllElementsByType(org.eclipse.emf.ecore.EClass metaElement)
      Returns a Set of the elements matching the given type, including elements in getReferencedResources().
      Parameters:
      metaElement - a metatype
      Returns:
      a Set of the elements matching the given type
      See Also:
    • register

      public void register()
      Registers EMF Packages.
    • addAllReferencedResources

      protected void addAllReferencedResources(org.eclipse.emf.ecore.resource.Resource resource)
      Searches for and adds all resources that are referenced from the main resource to referencedResources.
      Parameters:
      resource - the main resource
    • getReferencedResources

      public Set<org.eclipse.emf.ecore.resource.Resource> getReferencedResources()
      Returns the referencedResources.
      Returns:
      the referencedResources