Package org.eclipse.epsilon.eol.models
Interface IModel
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
IAdaptableModel
,IComparableModel
,IGenericSimulinkModel
,IReflectiveModel
- All Known Implementing Classes:
AbstractEmfModel
,AbstractReflectiveEmfModel
,AbstractSimulinkModel
,BibtexModel
,CachedModel
,CDOModel
,CompositeModel
,CsvModel
,DecoratorEmfModel
,EmfM0Model
,EmfMetaModel
,EmfModel
,EmptyModel
,ExcelModel
,GraphmlModel
,HtmlModel
,HutnModel
,InMemoryEmfModel
,InMemoryFlexmiModel
,JavaModel
,JavaObjectModel
,JdtModel
,JsonModel
,Model
,ModelGroup
,ModelReference
,MuddleModel
,PatternMatchModel
,PlainXmlModel
,ReflectiveModelReference
,SecureExcelModel
,SimulinkDictionaryModel
,SimulinkDictionaryModelInEclipse
,SimulinkModel
,SimulinkModelInEclipse
,SimulinkRequirementModel
,SimulinkRequirementModelInEclipse
,SpreadsheetModel
,UmlModel
,VirtualEmfModel
,XmlModel
,YamlModel
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionCollection<?>
Returns a collection containing all of the objects contained in this model.default IModel.AmbiguityCheckResult
checkAmbiguity
(String type) Used to test if a given type name is ambiguous or not within a model.default void
close()
createInstance
(String type) createInstance
(String type, Collection<Object> parameters) void
deleteElement
(Object instance) void
dispose()
Collection<?>
getAllOfKind
(String kind) Collection<?>
getAllOfType
(String type) getElementById
(String id) getElementId
(Object instance) getEnumerationValue
(String enumeration, String label) getFullyQualifiedTypeNameOf
(Object instance) Returns a string representing the fully-qualified type of the instance object.getMetamodel
(StringProperties properties, IRelativePathResolver resolver) getName()
getTypeNameOf
(Object instance) Returns a string representing the type of the instance object.boolean
boolean
isInstantiable
(String type) boolean
isModelElement
(Object instance) Used to test whether a Java object can be contained by this model.boolean
boolean
boolean
isPropertySet
(Object instance, String property) Returnstrue
if this instance has an explicit value for this property.boolean
boolean
boolean
knowsAboutProperty
(Object instance, String property) Returnstrue
if this instance could have this property at some point.void
load()
void
load
(StringProperties properties) void
load
(StringProperties properties, String basePath) void
load
(StringProperties properties, IRelativePathResolver relativePathResolver) boolean
Used to test whether an object is contained in this model.void
setElementId
(Object instance, String newId) void
void
setReadOnLoad
(boolean readOnLoad) void
setStoredOnDisposal
(boolean storedOnDisposal) boolean
store()
boolean
-
Method Details
-
load
- Throws:
EolModelLoadingException
-
load
- Throws:
EolModelLoadingException
-
load
void load(StringProperties properties, IRelativePathResolver relativePathResolver) throws EolModelLoadingException - Throws:
EolModelLoadingException
-
load
- Throws:
EolModelLoadingException
-
getName
String getName() -
setName
-
getAliases
-
getEnumerationValue
Object getEnumerationValue(String enumeration, String label) throws EolEnumerationValueNotFoundException -
allContents
Collection<?> allContents()Returns a collection containing all of the objects contained in this model.- Returns:
- all of the objects contained in this model.
-
getAllOfType
-
getAllOfKind
-
getTypeOf
-
getTypeNameOf
Returns a string representing the type of the instance object. The value returned by this function can be passed to createInstance to instantiate another object of the same type as instance.- Parameters:
instance
- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
- Throws:
IllegalArgumentException
- when isModelElement(instance) returns false
-
getFullyQualifiedTypeNameOf
Returns a string representing the fully-qualified type of the instance object. The value returned by this function can be passed to createInstance to instantiate another object of the same type as instance.- Parameters:
instance
- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
- Throws:
IllegalArgumentException
- when isModelElement(instance) returns false
-
createInstance
Object createInstance(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException -
createInstance
Object createInstance(String type, Collection<Object> parameters) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException -
getElementById
-
getElementId
-
setElementId
-
deleteElement
- Throws:
EolRuntimeException
-
isOfKind
-
isOfType
-
owns
Used to test whether an object is contained in this model.- Parameters:
instance
- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
knowsAboutProperty
Returnstrue
if this instance could have this property at some point. -
isPropertySet
Returnstrue
if this instance has an explicit value for this property. This would be equivalent to eIsSet in EMF.- Throws:
EolRuntimeException
-
isInstantiable
-
isModelElement
Used to test whether a Java object can be contained by this model. For example, EMF models can contain instances of EObject, but not instances of just Object.- Parameters:
instance
- the Java object to test.- Returns:
- true if and only if instance can be contained by this model.
-
hasType
-
checkAmbiguity
Used to test if a given type name is ambiguous or not within a model. For example, the package registry in an EMF model could include multiple EClasses with the same name. -
store
-
store
boolean store() -
dispose
void dispose() -
getPropertyGetter
IPropertyGetter getPropertyGetter() -
getPropertySetter
IPropertySetter getPropertySetter() -
isStoredOnDisposal
boolean isStoredOnDisposal() -
setStoredOnDisposal
void setStoredOnDisposal(boolean storedOnDisposal) -
isReadOnLoad
boolean isReadOnLoad() -
setReadOnLoad
void setReadOnLoad(boolean readOnLoad) -
getTransactionSupport
IModelTransactionSupport getTransactionSupport() -
getMetamodel
-
close
default void close()- Specified by:
close
in interfaceAutoCloseable
- Since:
- 1.6
-