Interface IModel
-
- All Superinterfaces:
IModelData
- All Known Subinterfaces:
IResolvableModel<V,M>,ITypedModel
- All Known Implementing Classes:
AbstractResolvableModel,DummyModel,Model,Project,Script,Template
public interface IModel extends IModelData
Represents the type of models to be managed.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()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.intgetImportsCount()Returns the number of imports.IndentationConfigurationgetIndentationConfiguration()Returns the indentation configuration for this model.java.lang.StringgetName()Returns the name of the model element.IRestrictionEvaluationContextgetRestrictionEvaluationContext()Returns the context for evaluating import / conflict restrictions.ModelImport<?>getSuper()Returns the reference to the super model (if it exists).VersiongetVersion()Returns the version of this model.voidsetVersion(Version version)Changes the version of this model.
-
-
-
Method Detail
-
setVersion
void setVersion(Version version)
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
java.lang.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
ModelImport<?> getImport(int index)
Returns the model import specified byindex.- Parameters:
index- a 0-based index specifying the import to be returned- Returns:
- the model import
- Throws:
java.lang.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
-
-