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:
AutoCloseable
,IModel
- Direct Known Subclasses:
GraphmlModel
public class MuddleModel extends Model
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult
-
-
Field Summary
Fields Modifier and Type Field Description protected Muddle
muddle
protected 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 Collection<?>
allContents()
Returns a collection containing all of the objects contained in this model.protected void
collectAllSubTypes(MuddleElementType elementType, Set<MuddleElementType> allSubTypes)
Object
createInstance(String t)
void
deleteElement(Object o)
Collection<?>
getAllOfKind(String type)
Collection<?>
getAllOfType(String type)
protected Set<MuddleElementType>
getAllSubTypes(MuddleElementType elementType)
Object
getElementById(String id)
String
getElementId(Object o)
Object
getEnumerationValue(String arg0, String arg1)
Muddle
getMuddle()
String
getTypeNameOf(Object o)
Returns a string representing the type of the instance object.Set<Feature>
getUnusedFeatures()
boolean
hasType(String type)
boolean
isInstantiable(String type)
boolean
isLoaded()
void
load()
protected MuddleElementType
muddleElementTypeForName(String name)
boolean
owns(Object o)
Used to test whether an object is contained in this model.void
setElementId(Object o, String id)
void
setMuddle(Muddle muddle)
boolean
store()
boolean
store(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
-
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
checkAmbiguity, close
-
-
-
-
Method Detail
-
allContents
public 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.
-
createInstance
public Object createInstance(String t) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException
-
deleteElement
public void deleteElement(Object o) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getAllOfKind
public Collection<?> getAllOfKind(String type) throws EolModelElementTypeNotFoundException
-
getAllSubTypes
protected Set<MuddleElementType> getAllSubTypes(MuddleElementType elementType)
-
collectAllSubTypes
protected void collectAllSubTypes(MuddleElementType elementType, Set<MuddleElementType> allSubTypes)
-
getAllOfType
public Collection<?> getAllOfType(String type) throws EolModelElementTypeNotFoundException
-
getEnumerationValue
public Object getEnumerationValue(String arg0, String arg1) throws EolEnumerationValueNotFoundException
-
getTypeNameOf
public String getTypeNameOf(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(String type)
-
isInstantiable
public boolean isInstantiable(String type)
-
owns
public boolean owns(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.
-
store
public boolean store()
-
store
public boolean store(String arg0)
-
muddleElementTypeForName
protected MuddleElementType muddleElementTypeForName(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
-
-