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
Modifier and TypeMethodDescriptiongetElementsByType(Object metaElement) Returns aSetof the elements matching the given type.Returns the ModelFactory used to create the current model.Returns theIReferenceModel(i.e.booleanReturns true if the given object is contained in this model's resource or a referenced resource.booleanisTarget()Defines if the model is readonly or not.newElement(Object metaElement) Creates a new element in the model.voidsetIsTarget(boolean value) Sets if the model is readonly or not.
-
Method Details
-
newElement
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
Returns aSetof the elements matching the given type.- Parameters:
metaElement- a metatype- Returns:
- a
Setof 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
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
-