public abstract class AbstractEmfModel extends CachedModel<org.eclipse.emf.ecore.EObject>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
expand |
protected org.eclipse.emf.ecore.resource.Resource |
modelImpl |
protected org.eclipse.emf.ecore.EPackage.Registry |
registry |
protected EmfModelTransactionSupport |
transactionSupport |
allContentsAreCached, allContentsCache, cachedKinds, cachedTypes, cachingEnabled, kindCache, PROPERTY_CACHED, typeCachealiases, name, PROPERTY_ALIASES, PROPERTY_NAME, PROPERTY_READONLOAD, PROPERTY_STOREONDISPOSAL, readOnLoad, storeOnDisposal| Constructor and Description |
|---|
AbstractEmfModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetamodelUri(String nsUri) |
protected Collection<org.eclipse.emf.ecore.EObject> |
allContentsFromModel() |
org.eclipse.emf.ecore.EClass |
classForName(String name) |
protected org.eclipse.emf.ecore.EClass |
classForName(String name,
boolean absolute,
Object pkg) |
protected org.eclipse.emf.ecore.EClass |
classForName(String name,
org.eclipse.emf.ecore.EPackage.Registry registry) |
protected org.eclipse.emf.ecore.EObject |
createInstanceInModel(String type) |
protected boolean |
deleteElementInModel(Object instance)
Returns true iff the given instance was deleted from the model.
|
void |
disposeModel() |
protected Collection<org.eclipse.emf.ecore.EObject> |
getAllOfKindFromModel(String kind) |
protected Collection<org.eclipse.emf.ecore.EObject> |
getAllOfTypeFromModel(String type) |
Collection<String> |
getAllTypeNamesOf(Object instance)
Returns the names of every type to which the
given object conforms.
|
Object |
getCacheKeyForType(String type)
Returns an identity for the given type,
which will be used by
CachedModel
as a key for the memoization of model elements
by type. |
Object |
getContainerOf(Object object) |
Object |
getElementById(String id) |
String |
getElementId(Object instance) |
Object |
getEnumerationValue(String enumeration,
String label) |
protected String |
getFullyQualifiedName(org.eclipse.emf.ecore.EClassifier eClassifier) |
String |
getFullyQualifiedTypeNameOf(Object instance)
Returns a string representing the fully-qualified type of the instance object.
|
protected InputStream |
getInputStream(String file) |
org.eclipse.emf.ecore.resource.Resource |
getModelImpl()
Deprecated.
Use getResource() instead
|
protected org.eclipse.emf.ecore.EPackage.Registry |
getPackageRegistry()
Get the (cached) package registry belonging to the model implementation,
if no registry is available the global one is provided
|
IPropertyGetter |
getPropertyGetter() |
IPropertySetter |
getPropertySetter() |
org.eclipse.emf.ecore.resource.Resource |
getResource() |
protected List<org.eclipse.emf.ecore.resource.Resource> |
getResources() |
IModelTransactionSupport |
getTransactionSupport() |
String |
getTypeNameOf(Object instance)
Returns a string representing the type of the instance object.
|
Object |
getTypeOf(Object instance) |
boolean |
hasType(String type) |
protected int |
instancesCount(org.eclipse.emf.ecore.resource.Resource r) |
boolean |
isExpand() |
boolean |
isInstantiable(String type) |
boolean |
isModelElement(Object instance)
Used to test whether a Java object can be contained by this model.
|
boolean |
isOfKind(Object instance,
String metaClass) |
boolean |
isOfType(Object instance,
String metaClass) |
boolean |
isPropertySet(Object instance,
String property)
Returns
true if this instance has an explicit value for this property. |
protected boolean |
knowsAboutProperty(org.eclipse.emf.ecore.EObject instance,
String property) |
boolean |
knowsAboutProperty(Object instance,
String property)
Returns
true if this instance could have this property at some point. |
boolean |
owns(Object instance)
Used to test whether an object is contained in this model.
|
protected void |
setDataTypesInstanceClasses(org.eclipse.emf.ecore.resource.Resource metamodel) |
void |
setElementId(Object instance,
String newId) |
void |
setExpand(boolean expand) |
void |
setModelImpl(org.eclipse.emf.ecore.resource.Resource modelImpl) |
void |
setResource(org.eclipse.emf.ecore.resource.Resource resource) |
boolean |
store(OutputStream os) |
boolean |
store(String fileName) |
boolean |
store(org.eclipse.emf.common.util.URI uri) |
allContents, clearCache, createInstance, deleteElement, dispose, getAllOfKind, getAllOfType, isCachingEnabled, load, load, loadModel, setCachingEnabledallInstances, createInstance, getAliases, getMetamodel, getName, isReadOnLoad, isStoredOnDisposal, load, load, setName, setReadOnLoad, setStoredOnDisposalprotected org.eclipse.emf.ecore.resource.Resource modelImpl
protected boolean expand
protected org.eclipse.emf.ecore.EPackage.Registry registry
protected EmfModelTransactionSupport transactionSupport
protected InputStream getInputStream(String file) throws IOException
IOExceptionprotected void setDataTypesInstanceClasses(org.eclipse.emf.ecore.resource.Resource metamodel)
public void addMetamodelUri(String nsUri)
protected org.eclipse.emf.ecore.EPackage.Registry getPackageRegistry()
public Object getEnumerationValue(String enumeration, String label) throws EolEnumerationValueNotFoundException
public boolean knowsAboutProperty(Object instance, String property)
IModeltrue if this instance could have this property at some point.knowsAboutProperty in interface IModelknowsAboutProperty in class Modelprotected boolean knowsAboutProperty(org.eclipse.emf.ecore.EObject instance,
String property)
public boolean isPropertySet(Object instance, String property) throws EolRuntimeException
IModeltrue if this instance has an explicit value for this property.
This would be equivalent to eIsSet in EMF.isPropertySet in interface IModelisPropertySet in class ModelEolRuntimeExceptionprotected Collection<org.eclipse.emf.ecore.EObject> getAllOfTypeFromModel(String type) throws EolModelElementTypeNotFoundException
getAllOfTypeFromModel in class CachedModel<org.eclipse.emf.ecore.EObject>EolModelElementTypeNotFoundExceptionpublic Object getCacheKeyForType(String type) throws EolModelElementTypeNotFoundException
CachedModelCachedModel
as a key for the memoization of model elements
by type.getCacheKeyForType in class CachedModel<org.eclipse.emf.ecore.EObject>EolModelElementTypeNotFoundExceptionpublic org.eclipse.emf.ecore.EClass classForName(String name) throws EolModelElementTypeNotFoundException
protected org.eclipse.emf.ecore.EClass classForName(String name, org.eclipse.emf.ecore.EPackage.Registry registry)
protected org.eclipse.emf.ecore.EClass classForName(String name, boolean absolute, Object pkg)
protected Collection<org.eclipse.emf.ecore.EObject> getAllOfKindFromModel(String kind) throws EolModelElementTypeNotFoundException
getAllOfKindFromModel in class CachedModel<org.eclipse.emf.ecore.EObject>EolModelElementTypeNotFoundExceptionprotected Collection<org.eclipse.emf.ecore.EObject> allContentsFromModel()
allContentsFromModel in class CachedModel<org.eclipse.emf.ecore.EObject>protected org.eclipse.emf.ecore.EObject createInstanceInModel(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException
createInstanceInModel in class CachedModel<org.eclipse.emf.ecore.EObject>EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeExceptionpublic IModelTransactionSupport getTransactionSupport()
getTransactionSupport in interface IModelgetTransactionSupport in class Modelprotected int instancesCount(org.eclipse.emf.ecore.resource.Resource r)
protected boolean deleteElementInModel(Object instance) throws EolRuntimeException
CachedModeldeleteElementInModel in class CachedModel<org.eclipse.emf.ecore.EObject>EolRuntimeExceptionpublic boolean owns(Object instance)
IModelinstance - the Java object to test.public boolean store(String fileName)
public boolean store(org.eclipse.emf.common.util.URI uri)
public boolean store(OutputStream os)
public void disposeModel()
disposeModel in class CachedModel<org.eclipse.emf.ecore.EObject>public org.eclipse.emf.ecore.resource.Resource getResource()
public void setResource(org.eclipse.emf.ecore.resource.Resource resource)
public org.eclipse.emf.ecore.resource.Resource getModelImpl()
public void setModelImpl(org.eclipse.emf.ecore.resource.Resource modelImpl)
protected List<org.eclipse.emf.ecore.resource.Resource> getResources()
public IPropertyGetter getPropertyGetter()
getPropertyGetter in interface IModelgetPropertyGetter in class Modelpublic IPropertySetter getPropertySetter()
getPropertySetter in interface IModelgetPropertySetter in class Modelpublic String getTypeNameOf(Object instance)
IModelinstance - The model object whose type is to be determined.public String getFullyQualifiedTypeNameOf(Object instance)
IModelgetFullyQualifiedTypeNameOf in interface IModelgetFullyQualifiedTypeNameOf in class Modelinstance - The model object whose type is to be determined.public Collection<String> getAllTypeNamesOf(Object instance)
CachedModelCachedModel for the memoization of
model elements by their kind (CachedModel.getAllOfKind(String)).getAllTypeNamesOf in class CachedModel<org.eclipse.emf.ecore.EObject>public boolean isInstantiable(String type)
public boolean hasType(String type)
protected String getFullyQualifiedName(org.eclipse.emf.ecore.EClassifier eClassifier)
public boolean isModelElement(Object instance)
IModelisModelElement in interface IModelisModelElement in class Modelinstance - the Java object to test.public boolean isExpand()
public boolean isOfKind(Object instance, String metaClass) throws EolModelElementTypeNotFoundException
isOfKind in interface IModelisOfKind in class ModelEolModelElementTypeNotFoundExceptionpublic boolean isOfType(Object instance, String metaClass) throws EolModelElementTypeNotFoundException
isOfType in interface IModelisOfType in class ModelEolModelElementTypeNotFoundExceptionpublic void setExpand(boolean expand)
Copyright © 2016. All rights reserved.