Interface IModel
- All Superinterfaces:
IModelData
- All Known Implementing Classes:
Model
Represents the type of models to be managed.
- Author:
- Holger Eichelberger
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Shall be called at the end of the lifetime of the model in order to clean up references such as listeners.ModelImport<?> getImport(int index) Returns the model import specified byindex.intReturns the number of imports.Returns the indentation configuration for this model.longReturns the last modification timestamp.getName()Returns the name of the model element.Returns the context for evaluating import / conflict restrictions.ModelImport<?> getSuper()Returns the reference to the super model (if it exists).Returns the version of this model.voidsetVersion(Version version) Changes the version of this model.
-
Method Details
-
setVersion
Changes the version of this model.- Parameters:
version- Version to set
-
getVersion
Version getVersion()Returns the version of this model.- Specified by:
getVersionin interfaceIModelData- Returns:
- the version or
nullif no version is specified for this model.
-
getName
String getName()Returns the name of the model element.- Specified by:
getNamein interfaceIModelData- Returns:
- the name of this model element.
-
getImportsCount
int getImportsCount()Returns the number of imports.- Returns:
- the number of imports
-
getImport
Returns the model import specified byindex.- Parameters:
index- a 0-based index specifying the import to be returned- Returns:
- the model import
- Throws:
IndexOutOfBoundsException- ifindex<0 || index>=getImportsCount()
-
getSuper
ModelImport<?> getSuper()Returns the reference to the super model (if it exists).- Returns:
- the super model (in terms of a model import/reference, may be null)
-
getIndentationConfiguration
IndentationConfiguration getIndentationConfiguration()Returns the indentation configuration for this model. The indentation configuration is considered to be immutable.- Returns:
- the indentation configuration (disabled if null)
-
dispose
void dispose()Shall be called at the end of the lifetime of the model in order to clean up references such as listeners. -
getRestrictionEvaluationContext
IRestrictionEvaluationContext getRestrictionEvaluationContext()Returns the context for evaluating import / conflict restrictions. This context shall only contain the information that is necessary to evaluate restriction information.- Returns:
- the evaluation context
-
getLastModification
long getLastModification()Returns the last modification timestamp.- Returns:
- the last modification timestamp, invalid if
0
-