Package org.eclipse.epsilon.emc.cdo
Class CDOModel
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.Model
-
- org.eclipse.epsilon.eol.models.CachedModel<org.eclipse.emf.ecore.EObject>
-
- org.eclipse.epsilon.emc.emf.AbstractEmfModel
-
- org.eclipse.epsilon.emc.emf.AbstractReflectiveEmfModel
-
- org.eclipse.epsilon.emc.cdo.CDOModel
-
- All Implemented Interfaces:
AutoCloseable
,IModel
,IReflectiveModel
public class CDOModel extends AbstractReflectiveEmfModel
CDO driver for Epsilon.
-
-
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 static String
PROPERTY_CDO_BRANCH
static String
PROPERTY_CDO_COLLECTION_INITIAL
static String
PROPERTY_CDO_COLLECTION_RCHUNK
static String
PROPERTY_CDO_CREATE_MISSING
static String
PROPERTY_CDO_FEATANALYZER
static String
PROPERTY_CDO_NAME
static String
PROPERTY_CDO_PATH
static String
PROPERTY_CDO_REVPREFETCH
static String
PROPERTY_CDO_URL
-
Fields inherited from class org.eclipse.epsilon.emc.emf.AbstractEmfModel
expand, modelImpl, PROPERTY_EXPAND, PROPERTY_PARALLELALLOF, registry, resourceLoadOptions, resourceStoreOptions, transactionSupport
-
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 CDOModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<org.eclipse.emf.ecore.EObject>
allContentsFromModel()
protected org.eclipse.emf.ecore.EClass
classForName(String name, org.eclipse.emf.ecore.EPackage.Registry registry)
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>
filterByResource(List<org.eclipse.emf.ecore.EObject> allInstances)
protected Collection<org.eclipse.emf.ecore.EObject>
getAllOfKindFromModel(String kind)
protected Collection<org.eclipse.emf.ecore.EObject>
getAllOfTypeFromModel(String type)
String
getBranchName()
protected org.eclipse.emf.cdo.eresource.CDOResource
getCDOResource()
String
getModelPath()
String
getRepositoryName()
String
getServerURL()
boolean
isCreateMissingResource()
void
load(StringProperties properties, IRelativePathResolver resolver)
protected void
loadModel()
void
setBranchName(String branchName)
void
setCreateMissingResource(boolean createMissingResource)
void
setModelPath(String modelPath)
void
setRepositoryName(String repositoryName)
void
setServerURL(String serverURL)
boolean
store()
-
Methods inherited from class org.eclipse.epsilon.emc.emf.AbstractReflectiveEmfModel
getEnumerationLabelOf, getEnumerationTypeOf, getPropertiesOf, getPropertySetter, hasPackage, hasProperty, isEnumerationValue, preventLoadingOfExternalModelElements
-
Methods inherited from class org.eclipse.epsilon.emc.emf.AbstractEmfModel
addMetamodelUri, checkAmbiguity, classesForName, classForName, classForName, createInstanceInModel, getAllTypeNamesOf, getCacheKeyForType, getContainerOf, getElementById, getElementId, getEnumerationValue, getFullyQualifiedName, getFullyQualifiedTypeNameOf, getInputStream, getModelImpl, getPackageRegistry, getResource, getResourceLoadOptions, getResources, getResourceStoreOptions, getTransactionSupport, getTypeNameOf, getTypeOf, hasAdapter, hasType, initCaches, isExpand, isInstantiable, isLoaded, isModelElement, isOfKind, isOfType, isParallelAllOf, isPropertySet, knowsAboutProperty, knowsAboutProperty, owns, putResourceLoadOption, putResourceStoreOption, setElementId, setExpand, setModelImpl, setParallelAllOf, setResource, setResourceLoadOptions, setResourceStoreOptions, store, store, store, validate
-
Methods inherited from class org.eclipse.epsilon.eol.models.CachedModel
addToCache, allContents, clearCache, createInstance, deleteElement, dispose, getAllOfKind, getAllOfKindOrType, getAllOfType, isCachingEnabled, isConcurrent, load, removeFromCache, setCachingEnabled, setConcurrent, wrap
-
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, getAliases, getMetamodel, getName, getPropertyGetter, isReadOnLoad, isStoredOnDisposal, 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, checkAmbiguity, close, createInstance, createInstance, deleteElement, dispose, getAliases, getAllOfKind, getAllOfType, getElementById, getElementId, getEnumerationValue, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getTransactionSupport, getTypeNameOf, getTypeOf, hasType, isInstantiable, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, owns, setElementId, setName, setReadOnLoad, setStoredOnDisposal, store
-
Methods inherited from interface org.eclipse.epsilon.eol.models.IReflectiveModel
getContainerOf
-
-
-
-
Field Detail
-
PROPERTY_CDO_URL
public static final String PROPERTY_CDO_URL
- See Also:
- Constant Field Values
-
PROPERTY_CDO_NAME
public static final String PROPERTY_CDO_NAME
- See Also:
- Constant Field Values
-
PROPERTY_CDO_PATH
public static final String PROPERTY_CDO_PATH
- See Also:
- Constant Field Values
-
PROPERTY_CDO_BRANCH
public static final String PROPERTY_CDO_BRANCH
- See Also:
- Constant Field Values
-
PROPERTY_CDO_COLLECTION_INITIAL
public static final String PROPERTY_CDO_COLLECTION_INITIAL
- See Also:
- Constant Field Values
-
PROPERTY_CDO_COLLECTION_RCHUNK
public static final String PROPERTY_CDO_COLLECTION_RCHUNK
- See Also:
- Constant Field Values
-
PROPERTY_CDO_REVPREFETCH
public static final String PROPERTY_CDO_REVPREFETCH
- See Also:
- Constant Field Values
-
PROPERTY_CDO_FEATANALYZER
public static final String PROPERTY_CDO_FEATANALYZER
- See Also:
- Constant Field Values
-
PROPERTY_CDO_CREATE_MISSING
public static final String PROPERTY_CDO_CREATE_MISSING
- See Also:
- Constant Field Values
-
-
Method Detail
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException
- Specified by:
load
in interfaceIModel
- Overrides:
load
in classAbstractEmfModel
- Throws:
EolModelLoadingException
-
loadModel
protected void loadModel() throws EolModelLoadingException
- Specified by:
loadModel
in classCachedModel<org.eclipse.emf.ecore.EObject>
- Throws:
EolModelLoadingException
-
getRepositoryName
public String getRepositoryName()
-
setRepositoryName
public void setRepositoryName(String repositoryName)
-
getServerURL
public String getServerURL()
-
setServerURL
public void setServerURL(String serverURL)
-
getModelPath
public String getModelPath()
-
setModelPath
public void setModelPath(String modelPath)
-
getBranchName
public String getBranchName()
-
setBranchName
public void setBranchName(String branchName)
-
isCreateMissingResource
public boolean isCreateMissingResource()
-
setCreateMissingResource
public void setCreateMissingResource(boolean createMissingResource)
-
disposeModel
public void disposeModel()
- Overrides:
disposeModel
in classAbstractEmfModel
-
classForName
protected org.eclipse.emf.ecore.EClass classForName(String name, org.eclipse.emf.ecore.EPackage.Registry registry)
- Overrides:
classForName
in classAbstractEmfModel
-
deleteElementInModel
protected boolean deleteElementInModel(Object instance) throws EolRuntimeException
Description copied from class:CachedModel
Returns true iff the given instance was deleted from the model.- Overrides:
deleteElementInModel
in classAbstractEmfModel
- Throws:
EolRuntimeException
-
getAllOfTypeFromModel
protected Collection<org.eclipse.emf.ecore.EObject> getAllOfTypeFromModel(String type) throws EolModelElementTypeNotFoundException
- Overrides:
getAllOfTypeFromModel
in classAbstractEmfModel
- Throws:
EolModelElementTypeNotFoundException
-
getAllOfKindFromModel
protected Collection<org.eclipse.emf.ecore.EObject> getAllOfKindFromModel(String kind) throws EolModelElementTypeNotFoundException
- Overrides:
getAllOfKindFromModel
in classAbstractEmfModel
- Throws:
EolModelElementTypeNotFoundException
-
filterByResource
protected Collection<org.eclipse.emf.ecore.EObject> filterByResource(List<org.eclipse.emf.ecore.EObject> allInstances)
-
allContentsFromModel
protected Collection<org.eclipse.emf.ecore.EObject> allContentsFromModel()
- Overrides:
allContentsFromModel
in classAbstractEmfModel
-
getCDOResource
protected org.eclipse.emf.cdo.eresource.CDOResource getCDOResource()
-
store
public boolean store()
-
-