Class ModelGraphToEmfModelConverter


  • public class ModelGraphToEmfModelConverter
    extends Object
    • Constructor Detail

      • ModelGraphToEmfModelConverter

        public ModelGraphToEmfModelConverter()
    • Method Detail

      • createEmfModel

        public org.eclipse.emf.ecore.EObject createEmfModel​(ModelGraph graph)
        Creates a new EMF model from the given graph. The resulting model is made up of copies of the objects referenced by the graph nodes. The copy of the object referenced by the root node of the graph will be returned as the root of the new EMF model.
        Parameters:
        graph - model graph to create an EMF model from
        Returns:
        the root object of the created model
      • getOrigin

        public ModelNode getOrigin​(org.eclipse.emf.ecore.EObject object)
        For an object created by the last call to createEmfModel(ModelGraph) this method returns the ModelNode which served as the origin for creating the node.
        Parameters:
        object - an object created by the last call to createEmfModel(ModelGraph)
        Returns:
        the model node which served as the origin to create the given object or null if this object has not been created during the last EMF model creation