Package org.eclipse.m2m.atl.core
Interface IModel
-
- All Known Subinterfaces:
IReferenceModel
- All Known Implementing Classes:
ASMModelWrapper
,AtlResourceImpl.EMFModelWrapper
,EMFModel
,EMFReferenceModel
public interface IModel
The IModel interface defines a model managed by any framework.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<? extends java.lang.Object>
getElementsByType(java.lang.Object metaElement)
Returns aSet
of the elements matching the given type.ModelFactory
getModelFactory()
Returns the ModelFactory used to create the current model.IReferenceModel
getReferenceModel()
Returns theIReferenceModel
(i.e.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.
-
-
-
Method Detail
-
newElement
java.lang.Object newElement(java.lang.Object metaElement)
Creates a new element in the model.- Parameters:
metaElement
- the new element metatype- Returns:
- the newly created element
-
getReferenceModel
IReferenceModel getReferenceModel()
Returns theIReferenceModel
(i.e. the metamodel).- Returns:
- the
IReferenceModel
-
getElementsByType
java.util.Set<? extends java.lang.Object> getElementsByType(java.lang.Object metaElement)
Returns aSet
of the elements matching the given type.- Parameters:
metaElement
- a metatype- Returns:
- a
Set
of the elements matching the given type
-
isTarget
boolean isTarget()
Defines if the model is readonly or not.- Returns:
- true if the model allows writing
-
setIsTarget
void setIsTarget(boolean value)
Sets if the model is readonly or not.- Parameters:
value
- true if the model allows writing
-
getModelFactory
ModelFactory getModelFactory()
Returns the ModelFactory used to create the current model.- Returns:
- true if the model allows writing
-
isModelOf
boolean isModelOf(java.lang.Object object)
Returns true if the given object is contained in this model's resource or a referenced resource.- Parameters:
object
- the model element- Returns:
- true if object is contained in this model's resource or a referenced resource
-
-