|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.m2m.atl.core.emf.EMFModel
public class EMFModel
The EMF implementation of IModel
.
Field Summary | |
---|---|
protected java.util.Map<org.eclipse.emf.ecore.EClass,java.util.Set<org.eclipse.emf.ecore.EObject>> |
elementsByType
|
protected EMFReferenceModel |
referenceModel
The metamodel. |
Constructor Summary | |
---|---|
EMFModel(EMFReferenceModel referenceModel,
EMFModelFactory mf)
Creates a new EMFModel conforming to the given EMFReferenceModel . |
Method Summary | |
---|---|
void |
commitToResource()
Finalizes the model. |
protected void |
finalize()
|
java.util.Set<org.eclipse.emf.ecore.EObject> |
getElementsByType(java.lang.Object metaElement)
Returns a Set of the elements matching the given type. |
EMFModelFactory |
getModelFactory()
Returns the ModelFactory used to create the current model. |
EMFReferenceModel |
getReferenceModel()
Returns the IReferenceModel (i.e. the metamodel). |
org.eclipse.emf.ecore.resource.Resource |
getResource()
Returns the resource. |
boolean |
isModelOf(java.lang.Object object)
Returns true if the given object is contained in this model's resource or a referenced resource. |
boolean |
isTarget()
Defines if the model is readonly or not. |
java.lang.Object |
newElement(java.lang.Object metaElement)
Creates a new element in the model. |
void |
setIsTarget(boolean value)
Sets if the model is readonly or not. |
protected void |
setResource(org.eclipse.emf.ecore.resource.Resource resource)
Sets the resource with the resource value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EMFReferenceModel referenceModel
protected java.util.Map<org.eclipse.emf.ecore.EClass,java.util.Set<org.eclipse.emf.ecore.EObject>> elementsByType
Constructor Detail |
---|
public EMFModel(EMFReferenceModel referenceModel, EMFModelFactory mf)
EMFModel
conforming to the given EMFReferenceModel
.
referenceModel
- the metamodel.mf
- the model factory that is creating this model.Method Detail |
---|
public java.lang.Object newElement(java.lang.Object metaElement)
newElement
in interface IModel
metaElement
- the new element metatype
IModel.newElement(java.lang.Object)
public EMFReferenceModel getReferenceModel()
IReferenceModel
(i.e. the metamodel).
getReferenceModel
in interface IModel
IReferenceModel
IModel.getReferenceModel()
public java.util.Set<org.eclipse.emf.ecore.EObject> getElementsByType(java.lang.Object metaElement)
Set
of the elements matching the given type.
getElementsByType
in interface IModel
metaElement
- a metatype
Set
of the elements matching the given typeIModel.getElementsByType(java.lang.Object)
public boolean isTarget()
isTarget
in interface IModel
IModel.isTarget()
public void setIsTarget(boolean value)
setIsTarget
in interface IModel
value
- true if the model allows writingIModel.setIsTarget(boolean)
public org.eclipse.emf.ecore.resource.Resource getResource()
protected void setResource(org.eclipse.emf.ecore.resource.Resource resource)
resource
- the resource to setpublic EMFModelFactory getModelFactory()
getModelFactory
in interface IModel
IModel.getModelFactory()
public void commitToResource()
public boolean isModelOf(java.lang.Object object)
isModelOf
in interface IModel
object
- the model element
IModel.isModelOf(java.lang.Object)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Object.finalize()
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |