Package org.eclipse.epsilon.emc.muddle
Class MuddleModel
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.Model
-
- org.eclipse.epsilon.emc.muddle.MuddleModel
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IModel
- Direct Known Subclasses:
GraphmlModel
public class MuddleModel extends Model
-
-
Field Summary
Fields Modifier and Type Field Description protected Muddle
muddle
protected java.util.Set<Feature>
unusedFeatures
-
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 MuddleModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<?>
allContents()
Returns a collection containing all of the objects contained in this model.protected void
collectAllSubTypes(MuddleElementType elementType, java.util.Set<MuddleElementType> allSubTypes)
java.lang.Object
createInstance(java.lang.String t)
void
deleteElement(java.lang.Object o)
java.util.Collection<?>
getAllOfKind(java.lang.String type)
java.util.Collection<?>
getAllOfType(java.lang.String type)
protected java.util.Set<MuddleElementType>
getAllSubTypes(MuddleElementType elementType)
java.lang.Object
getElementById(java.lang.String id)
java.lang.String
getElementId(java.lang.Object o)
java.lang.Object
getEnumerationValue(java.lang.String arg0, java.lang.String arg1)
Muddle
getMuddle()
java.lang.String
getTypeNameOf(java.lang.Object o)
Returns a string representing the type of the instance object.java.util.Set<Feature>
getUnusedFeatures()
boolean
hasType(java.lang.String type)
boolean
isInstantiable(java.lang.String type)
boolean
isLoaded()
void
load()
protected MuddleElementType
muddleElementTypeForName(java.lang.String name)
boolean
owns(java.lang.Object o)
Used to test whether an object is contained in this model.void
setElementId(java.lang.Object o, java.lang.String id)
void
setMuddle(Muddle muddle)
boolean
store()
boolean
store(java.lang.String arg0)
-
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, dispose, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getPropertySetter, getTransactionSupport, getTypeOf, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
-
-
-
Method Detail
-
allContents
public java.util.Collection<?> allContents()
Description copied from interface:IModel
Returns a collection containing all of the objects contained in this model.- Returns:
- all of the objects contained in this model.
-
getUnusedFeatures
public java.util.Set<Feature> getUnusedFeatures()
-
createInstance
public java.lang.Object createInstance(java.lang.String t) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException
-
deleteElement
public void deleteElement(java.lang.Object o) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllOfKind
public java.util.Collection<?> getAllOfKind(java.lang.String type) throws EolModelElementTypeNotFoundException
-
getAllSubTypes
protected java.util.Set<MuddleElementType> getAllSubTypes(MuddleElementType elementType)
-
collectAllSubTypes
protected void collectAllSubTypes(MuddleElementType elementType, java.util.Set<MuddleElementType> allSubTypes)
-
getAllOfType
public java.util.Collection<?> getAllOfType(java.lang.String type) throws EolModelElementTypeNotFoundException
-
getElementById
public java.lang.Object getElementById(java.lang.String id)
-
getElementId
public java.lang.String getElementId(java.lang.Object o)
-
getEnumerationValue
public java.lang.Object getEnumerationValue(java.lang.String arg0, java.lang.String arg1) throws EolEnumerationValueNotFoundException
-
getTypeNameOf
public java.lang.String getTypeNameOf(java.lang.Object o)
Description copied from interface:IModel
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:
o
- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
hasType
public boolean hasType(java.lang.String type)
-
isInstantiable
public boolean isInstantiable(java.lang.String type)
-
owns
public boolean owns(java.lang.Object o)
Description copied from interface:IModel
Used to test whether an object is contained in this model.- Parameters:
o
- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
setElementId
public void setElementId(java.lang.Object o, java.lang.String id)
-
store
public boolean store()
-
store
public boolean store(java.lang.String arg0)
-
muddleElementTypeForName
protected MuddleElementType muddleElementTypeForName(java.lang.String name)
-
setMuddle
public void setMuddle(Muddle muddle)
-
getMuddle
public Muddle getMuddle()
-
load
public void load() throws EolModelLoadingException
- Throws:
EolModelLoadingException
-
isLoaded
public boolean isLoaded()
- Since:
- 1.6
-
-