Package org.eclipse.m2m.atl.core
Interface IModel
-
- All Known Subinterfaces:
IReferenceModel
- All Known Implementing Classes:
ASMModelWrapper,AtlResourceImpl.EMFModelWrapper,EMFModel,EMFReferenceModel
public interface IModelThe 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 aSetof the elements matching the given type.ModelFactorygetModelFactory()Returns the ModelFactory used to create the current model.IReferenceModelgetReferenceModel()Returns theIReferenceModel(i.e.booleanisModelOf(java.lang.Object object)Returns 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.java.lang.ObjectnewElement(java.lang.Object metaElement)Creates a new element in the model.voidsetIsTarget(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 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
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
-
-