Class ModelGraphToEmfModelConverter
- java.lang.Object
-
- de.uni_marburg.mdo_over.graphtools.emf.ModelGraphToEmfModelConverter
-
public class ModelGraphToEmfModelConverter extends Object
-
-
Constructor Summary
Constructors Constructor Description ModelGraphToEmfModelConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.emf.ecore.EObject
createEmfModel(ModelGraph graph)
Creates a new EMF model from the givengraph
.ModelNode
getOrigin(org.eclipse.emf.ecore.EObject object)
For an object created by the last call tocreateEmfModel(ModelGraph)
this method returns theModelNode
which served as the origin for creating the node.
-
-
-
Method Detail
-
createEmfModel
public org.eclipse.emf.ecore.EObject createEmfModel(ModelGraph graph)
Creates a new EMF model from the givengraph
. 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 tocreateEmfModel(ModelGraph)
this method returns theModelNode
which served as the origin for creating the node.- Parameters:
object
- an object created by the last call tocreateEmfModel(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
-
-