Class SimulinkRequirementModel
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.Model
-
- org.eclipse.epsilon.eol.models.CachedModel<ISimulinkModelElement>
-
- org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
-
- org.eclipse.epsilon.emc.simulink.requirement.model.SimulinkRequirementModel
-
- All Implemented Interfaces:
java.lang.AutoCloseable,ISimulinkModelElement,IGenericSimulinkModel,ISimulinkRequirementModelElement,IOperationContributorProvider,IModel,IModelElement
- Direct Known Subclasses:
SimulinkRequirementModelInEclipse
public class SimulinkRequirementModel extends AbstractSimulinkModel implements ISimulinkRequirementModelElement, IOperationContributorProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected RequirementModelOperationContributorreqOperationContributorprotected MatlabHandleElementreqSetHandle-
Fields inherited from class org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
closeOnDispose, enableTryCatch, engine, engineJarPath, enginePoolSize, ENV_ENGINE_JAR_PATH, ENV_LIBRARY_PATH, ENV_MATLAB_PATH, file, libraryPath, matlabPath, openOnLoad, paths, PROPERTY_CLOSE_ON_DISPOSE, PROPERTY_CURRENT_SIMULINK_PROJECT, PROPERTY_ENABLE_TRY_CATCH, PROPERTY_ENGINE_JAR_PATH, PROPERTY_ENGINE_POOL_SIZE, PROPERTY_FILE, PROPERTY_LIBRARY_PATH, PROPERTY_MATLAB_PATH, PROPERTY_OPEN_ON_LOAD, PROPERTY_PATHS, PROPERTY_REDUCE_EXCHANGES, PROPERTY_SIMULINK_PROJECT, PROPERTY_TRACK_API, PROPERTY_WORKING_DIR, reduceExchanges, simulinkProject, useCurrentProject, workingDir
-
Fields inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContentsCache, kindCache, PROPERTY_CACHED, PROPERTY_CONCURRENT, typeCache
-
Fields inherited from class org.eclipse.epsilon.eol.models.Model
aliases, ENV_PREFIX, name, PROPERTY_ALIASES, PROPERTY_NAME, PROPERTY_READONLOAD, PROPERTY_READONLY, PROPERTY_STOREONDISPOSAL, propertyGetter, propertySetter, readOnLoad, storeOnDisposal
-
-
Constructor Summary
Constructors Constructor Description SimulinkRequirementModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<ISimulinkModelElement>allContentsFromModel()protected voidcloseMatlabModel()java.lang.ObjectcreateInstance(java.lang.String type, java.util.Collection<java.lang.Object> parameters)protected ISimulinkModelElementcreateInstanceInModel(java.lang.String type)booleandeleteElementInModel()protected booleandeleteElementInModel(java.lang.Object instance)Returns true iff the given instance was deleted from the model.protected java.util.Collection<ISimulinkModelElement>getAllOfKindFromModel(java.lang.String kind)protected java.util.Collection<ISimulinkModelElement>getAllOfTypeFromModel(java.lang.String type)java.util.Collection<java.lang.String>getAllTypeNamesOf()java.lang.ObjectgetElementById(java.lang.String id)java.lang.StringgetElementId(java.lang.Object instance)MatlabHandleElementgetHandle()OperationContributorgetOperationContributor()IModelgetOwningModel()java.lang.ObjectgetProperty(java.lang.String property)java.lang.StringgetType()java.lang.StringgetTypeNameOf(java.lang.Object instance)Returns a string representing the type of the instance object.booleanhasType(java.lang.String type)booleanisInstantiable(java.lang.String type)voidload(StringProperties properties, IRelativePathResolver resolver)protected voidloadModel()static voidmain(java.lang.String[] args)booleanowns(java.lang.Object instance)Used to test whether an object is contained in this model.voidsetElementId(java.lang.Object instance, java.lang.String newId)voidsetProperty(java.lang.String property, java.lang.Object value)booleanstore()booleanstore(java.lang.String location)-
Methods inherited from class org.eclipse.epsilon.emc.simulink.model.AbstractSimulinkModel
addPath, addPath, disposeModel, flush, getAllTypeNamesOf, getCacheKeyForType, getEngine, getEngineJarPath, getEnumerationValue, getFile, getLibraryPath, getMatlabPath, getPaths, getProject, getWorkingDir, getWorkspaceVariable, isCloseOnDispose, isEnableTryCatch, isLoaded, isOpenOnLoad, isReduceExchanges, isTrackApi, isUseCurrentProject, parseMatlabEngineVariable, resolvePaths, setCloseOnDispose, setEnableTryCatch, setEngine, setEngineJarPath, setFile, setLibraryPath, setMatlabPath, setOpenOnLoad, setProject, setProject, setReduceExchanges, setTrackApi, setUseCurrentProject, setWorkingDir, statement, statementWithResult
-
Methods inherited from class org.eclipse.epsilon.eol.models.CachedModel
addToCache, allContents, clearCache, createInstance, deleteElement, dispose, getAllOfKind, getAllOfKindOrType, getAllOfType, initCaches, isCachingEnabled, isConcurrent, load, removeFromCache, setCachingEnabled, setConcurrent, wrap
-
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.models.IModel
allContents, close, createInstance, deleteElement, dispose, getAliases, getAllOfKind, getAllOfType, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
Methods inherited from interface org.eclipse.epsilon.emc.simulink.model.element.ISimulinkModelElement
equals, getEngine
-
-
-
-
Field Detail
-
reqSetHandle
protected MatlabHandleElement reqSetHandle
-
reqOperationContributor
protected RequirementModelOperationContributor reqOperationContributor
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException
- Specified by:
loadin interfaceIModel- Overrides:
loadin classAbstractSimulinkModel- Throws:
EolModelLoadingException
-
loadModel
protected void loadModel() throws EolModelLoadingException- Overrides:
loadModelin classAbstractSimulinkModel- Throws:
EolModelLoadingException
-
getProperty
public java.lang.Object getProperty(java.lang.String property) throws EolRuntimeException- Specified by:
getPropertyin interfaceISimulinkModelElement- Throws:
EolRuntimeException
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value) throws EolRuntimeException- Specified by:
setPropertyin interfaceISimulinkModelElement- Throws:
EolRuntimeException
-
getAllTypeNamesOf
public java.util.Collection<java.lang.String> getAllTypeNamesOf()
- Specified by:
getAllTypeNamesOfin interfaceISimulinkModelElement
-
deleteElementInModel
public boolean deleteElementInModel() throws EolRuntimeException- Specified by:
deleteElementInModelin interfaceISimulinkModelElement- Throws:
EolRuntimeException
-
getType
public java.lang.String getType()
- Specified by:
getTypein interfaceISimulinkModelElement
-
getHandle
public MatlabHandleElement getHandle()
- Specified by:
getHandlein interfaceISimulinkModelElement
-
getOwningModel
public IModel getOwningModel()
- Specified by:
getOwningModelin interfaceIModelElement
-
getTypeNameOf
public java.lang.String getTypeNameOf(java.lang.Object instance)
Description copied from interface:IModelReturns 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.- Specified by:
getTypeNameOfin interfaceIModel- Parameters:
instance- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
getElementById
public java.lang.Object getElementById(java.lang.String id)
- Specified by:
getElementByIdin interfaceIModel
-
getElementId
public java.lang.String getElementId(java.lang.Object instance)
- Specified by:
getElementIdin interfaceIModel
-
getOperationContributor
public OperationContributor getOperationContributor()
- Specified by:
getOperationContributorin interfaceIOperationContributorProvider
-
setElementId
public void setElementId(java.lang.Object instance, java.lang.String newId)- Specified by:
setElementIdin interfaceIModel
-
owns
public boolean owns(java.lang.Object instance)
Description copied from interface:IModelUsed to test whether an object is contained in this model.- Specified by:
ownsin interfaceIModel- Overrides:
ownsin classAbstractSimulinkModel- Parameters:
instance- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
isInstantiable
public boolean isInstantiable(java.lang.String type)
- Specified by:
isInstantiablein interfaceIModel- Overrides:
isInstantiablein classAbstractSimulinkModel
-
closeMatlabModel
protected void closeMatlabModel()
- Specified by:
closeMatlabModelin classAbstractSimulinkModel
-
allContentsFromModel
protected java.util.Collection<ISimulinkModelElement> allContentsFromModel()
- Specified by:
allContentsFromModelin classCachedModel<ISimulinkModelElement>
-
getAllOfTypeFromModel
protected java.util.Collection<ISimulinkModelElement> getAllOfTypeFromModel(java.lang.String type) throws EolModelElementTypeNotFoundException
- Specified by:
getAllOfTypeFromModelin classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
getAllOfKindFromModel
protected java.util.Collection<ISimulinkModelElement> getAllOfKindFromModel(java.lang.String kind) throws EolModelElementTypeNotFoundException
- Specified by:
getAllOfKindFromModelin classCachedModel<ISimulinkModelElement>- Throws:
EolModelElementTypeNotFoundException
-
createInstanceInModel
protected ISimulinkModelElement createInstanceInModel(java.lang.String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException
- Overrides:
createInstanceInModelin classAbstractSimulinkModel- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
createInstance
public java.lang.Object createInstance(java.lang.String type, java.util.Collection<java.lang.Object> parameters) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException- Specified by:
createInstancein interfaceIModel- Overrides:
createInstancein classModel- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
deleteElementInModel
protected boolean deleteElementInModel(java.lang.Object instance) throws EolRuntimeExceptionDescription copied from class:CachedModelReturns true iff the given instance was deleted from the model.- Specified by:
deleteElementInModelin classCachedModel<ISimulinkModelElement>- Throws:
EolRuntimeException
-
-