org.eclipse.emf.cdo.eresource.impl
Class CDOResourceImpl
java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.emf.ecore.impl.EStoreEObjectImpl
org.eclipse.emf.internal.cdo.CDOObjectImpl
org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl
org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
- All Implemented Interfaces:
- CDOObject, CDOPackageTypeRegistry.CDOObjectMarker, CDOResource, CDOResourceNode, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder, org.eclipse.emf.ecore.InternalEObject, org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.resource.Resource.Internal, InternalCDOLoadable, InternalCDOObject
public class CDOResourceImpl
- extends CDOResourceNodeImpl
- implements CDOResource, org.eclipse.emf.ecore.resource.Resource.Internal
An implementation of the model object 'CDO Resource'.
| Nested classes/interfaces inherited from class org.eclipse.emf.internal.cdo.CDOObjectImpl |
org.eclipse.emf.internal.cdo.CDOObjectImpl.CDOStoreFeatureMap, org.eclipse.emf.internal.cdo.CDOObjectImpl.CDOStoreSettingsImpl |
| Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.EStoreEObjectImpl |
org.eclipse.emf.ecore.impl.EStoreEObjectImpl.BasicEStoreEList<E>, org.eclipse.emf.ecore.impl.EStoreEObjectImpl.BasicEStoreFeatureMap, org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreEList<E>, org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreEPropertiesHolderImpl, org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreFeatureMap, org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreImpl |
| Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl |
| Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter> |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource |
org.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedException |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource |
org.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedException |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
org.eclipse.emf.ecore.InternalEObject.EStore |
| Fields inherited from class org.eclipse.emf.ecore.impl.EStoreEObjectImpl |
ENO_SETTINGS, eSettings, eStore, EUNINITIALIZED_CONTAINER |
| Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY |
| Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET |
| Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
OPTION_CIPHER, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS |
| Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
OPTION_CIPHER, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS |
| Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
EOPPOSITE_FEATURE_BASE |
| Fields inherited from interface org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder |
NIL |
|
Method Summary |
void |
attached(org.eclipse.emf.ecore.EObject object)
|
org.eclipse.emf.common.notify.NotificationChain |
basicSetResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.notify.NotificationChain notifications)
|
void |
cdoInternalPostDetach(boolean remote)
|
void |
cdoInternalPreLoad()
|
protected org.eclipse.emf.common.util.EList<?> |
createList(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
|
void |
delete(java.util.Map<?,?> options)
deletes the resource using the specified options, unloads
it, and then removes it from the containing resource set. |
void |
detached(org.eclipse.emf.ecore.EObject object)
|
org.eclipse.emf.ecore.resource.Resource.Internal |
eDirectResource()
|
protected org.eclipse.emf.ecore.EClass |
eStaticClass()
|
org.eclipse.emf.common.util.TreeIterator<org.eclipse.emf.ecore.EObject> |
getAllContents()
|
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> |
getContents()
|
org.eclipse.emf.ecore.EObject |
getEObject(java.lang.String uriFragment)
Note: URI from temporary objects are going to changed when we commit the CDOTransaction. |
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource.Diagnostic> |
getErrors()
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
|
long |
getTimeStamp()
|
org.eclipse.emf.common.util.URI |
getURI()
|
java.lang.String |
getURIFragment(org.eclipse.emf.ecore.EObject object)
|
org.eclipse.emf.common.util.URI |
getURIGen()
|
org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource.Diagnostic> |
getWarnings()
|
boolean |
isExisting()
|
boolean |
isLoaded()
|
boolean |
isLoading()
|
boolean |
isModified()
|
boolean |
isRoot()
|
boolean |
isTrackingModification()
|
void |
load(java.io.InputStream inputStream,
java.util.Map<?,?> options)
|
void |
load(java.util.Map<?,?> options)
|
void |
save(java.util.Map<?,?> options)
|
void |
save(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
|
void |
setModified(boolean newModified)
|
void |
setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet newResourceSet)
|
void |
setTimeStamp(long newTimeStamp)
|
void |
setTrackingModification(boolean newTrackingModification)
|
void |
setURI(org.eclipse.emf.common.util.URI newURI)
|
void |
setURIGen(org.eclipse.emf.common.util.URI newURI)
|
void |
unload()
|
| Methods inherited from class org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl |
basicSetFolder, basicSetName, eStaticFeatureCount, getFolder, getName, getPath, setFolder, setFolderGen, setName, setNameGen, setPath |
| Methods inherited from class org.eclipse.emf.internal.cdo.CDOObjectImpl |
cdoBasicSettings, cdoConflict, cdoDirectResource, cdoID, cdoInternalCleanup, cdoInternalDynamicFeature, cdoInternalInstance, cdoInternalPostAttach, cdoInternalPostInvalidate, cdoInternalPostLoad, cdoInternalPreCommit, cdoInternalSetID, cdoInternalSetResource, cdoInternalSetRevision, cdoInternalSetState, cdoInternalSetView, cdoInvalid, cdoReadLock, cdoReload, cdoResource, cdoRevision, cdoSettings, cdoState, cdoView, cdoWriteLock, createFeatureMap, dynamicSet, dynamicUnset, eAdapters, eBasicSetContainer, eBasicSetContainer, eContainerFeatureID, eDynamicIsSet, eInitializeContainer, eInternalContainer, eIsCaching, equals, eSetDirectResource, eSetResource, eStore, instanceToRevisionFeature, revisionToInstanceFeature, toString |
| Methods inherited from class org.eclipse.emf.ecore.impl.EStoreEObjectImpl |
dynamicGet, eDerivedStructuralFeatureID, eHasSettings, eProperties, eSetStore, eSettings |
| Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
eBasicAdapters, eBasicProperties, eClass, eDeliver, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI |
| Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSet, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eUnset, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues |
| Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.cdo.CDOObject |
cdoConflict, cdoDirectResource, cdoID, cdoInvalid, cdoReadLock, cdoReload, cdoResource, cdoRevision, cdoState, cdoView, cdoWriteLock |
| Methods inherited from interface org.eclipse.emf.ecore.EObject |
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
| Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
| Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
eBaseStructuralFeatureID, eBasicRemoveFromContainer, eDerivedStructuralFeatureID, eGet, eGet, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eNotificationRequired, eObjectForURIFragmentSegment, eProxyURI, eResolveProxy, eSet, eSetClass, eSetProxyURI, eSetStore, eSetting, eUnset, eURIFragmentSegment |
CDOResourceImpl
public CDOResourceImpl(org.eclipse.emf.common.util.URI initialURI)
- Since:
- 2.0
CDOResourceImpl
protected CDOResourceImpl()
-
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()
-
- Overrides:
eStaticClass in class CDOResourceNodeImpl
eDirectResource
public org.eclipse.emf.ecore.resource.Resource.Internal eDirectResource()
-
- Specified by:
eDirectResource in interface org.eclipse.emf.ecore.InternalEObject- Overrides:
eDirectResource in class org.eclipse.emf.internal.cdo.CDOObjectImpl
- Since:
- 2.0
isRoot
public boolean isRoot()
- Specified by:
isRoot in interface CDOResourceNode
- Since:
- 2.0
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
-
- Specified by:
getResourceSet in interface CDOResource- Specified by:
getResourceSet in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Resource Set' attribute.
- See Also:
CDOResource.setResourceSet(ResourceSet),
EresourcePackage.getCDOResource_ResourceSet()
setResourceSet
public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet newResourceSet)
-
- Specified by:
setResourceSet in interface CDOResource
- Parameters:
newResourceSet - the new value of the 'Resource Set' attribute.- See Also:
CDOResource.getResourceSet()
getURIGen
public org.eclipse.emf.common.util.URI getURIGen()
-
- Since:
- 2.0
getURI
public org.eclipse.emf.common.util.URI getURI()
-
- Specified by:
getURI in interface CDOResource- Specified by:
getURI in interface CDOResourceNode- Specified by:
getURI in interface org.eclipse.emf.ecore.resource.Resource- Overrides:
getURI in class CDOResourceNodeImpl
- Returns:
- the value of the 'URI' attribute.
- See Also:
CDOResource.setURI(URI),
EresourcePackage.getCDOResource_URI()
setURIGen
public void setURIGen(org.eclipse.emf.common.util.URI newURI)
-
- Since:
- 2.0
setURI
public void setURI(org.eclipse.emf.common.util.URI newURI)
-
- Specified by:
setURI in interface CDOResource- Specified by:
setURI in interface org.eclipse.emf.ecore.resource.Resource
- Parameters:
newURI - the new value of the 'URI' attribute.- See Also:
CDOResource.getURI()
getContents
public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getContents()
-
- Specified by:
getContents in interface CDOResource- Specified by:
getContents in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Contents' containment reference list.
- See Also:
EresourcePackage.getCDOResource_Contents()
cdoInternalPostDetach
public void cdoInternalPostDetach(boolean remote)
- Specified by:
cdoInternalPostDetach in interface InternalCDOObject- Overrides:
cdoInternalPostDetach in class org.eclipse.emf.internal.cdo.CDOObjectImpl
- Since:
- 2.0
isModified
public boolean isModified()
-
- Specified by:
isModified in interface CDOResource- Specified by:
isModified in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Modified' attribute.
- See Also:
CDOResource.setModified(boolean),
EresourcePackage.getCDOResource_Modified()
setModified
public void setModified(boolean newModified)
-
- Specified by:
setModified in interface CDOResource- Specified by:
setModified in interface org.eclipse.emf.ecore.resource.Resource
- Parameters:
newModified - the new value of the 'Modified' attribute.- See Also:
CDOResource.isModified()
isLoaded
public boolean isLoaded()
-
- Specified by:
isLoaded in interface CDOResource- Specified by:
isLoaded in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Loaded' attribute.
- See Also:
EresourcePackage.getCDOResource_Loaded()
isTrackingModification
public boolean isTrackingModification()
-
- Specified by:
isTrackingModification in interface CDOResource- Specified by:
isTrackingModification in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Tracking Modification' attribute.
- See Also:
CDOResource.setTrackingModification(boolean),
EresourcePackage.getCDOResource_TrackingModification()
setTrackingModification
public void setTrackingModification(boolean newTrackingModification)
-
- Specified by:
setTrackingModification in interface CDOResource- Specified by:
setTrackingModification in interface org.eclipse.emf.ecore.resource.Resource
- Parameters:
newTrackingModification - the new value of the 'Tracking Modification' attribute.- See Also:
CDOResource.isTrackingModification()
getErrors
public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getErrors()
-
- Specified by:
getErrors in interface CDOResource- Specified by:
getErrors in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Errors' attribute list.
- See Also:
EresourcePackage.getCDOResource_Errors()
getWarnings
public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getWarnings()
-
- Specified by:
getWarnings in interface CDOResource- Specified by:
getWarnings in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Warnings' attribute list.
- See Also:
EresourcePackage.getCDOResource_Warnings()
getTimeStamp
public long getTimeStamp()
-
- Specified by:
getTimeStamp in interface CDOResource- Specified by:
getTimeStamp in interface org.eclipse.emf.ecore.resource.Resource
- Returns:
- the value of the 'Time Stamp' attribute.
- See Also:
CDOResource.setTimeStamp(long),
EresourcePackage.getCDOResource_TimeStamp()
setTimeStamp
public void setTimeStamp(long newTimeStamp)
-
- Specified by:
setTimeStamp in interface CDOResource- Specified by:
setTimeStamp in interface org.eclipse.emf.ecore.resource.Resource
- Parameters:
newTimeStamp - the new value of the 'Time Stamp' attribute.- See Also:
CDOResource.getTimeStamp()
getAllContents
public org.eclipse.emf.common.util.TreeIterator<org.eclipse.emf.ecore.EObject> getAllContents()
- Specified by:
getAllContents in interface org.eclipse.emf.ecore.resource.Resource
- See Also:
ResourceImpl.getAllContents()
getEObject
public org.eclipse.emf.ecore.EObject getEObject(java.lang.String uriFragment)
- Note: URI from temporary objects are going to changed when we commit the CDOTransaction. Objects will not be
accessible from their temporary URI once CDOTransaction is committed.
Note: This resource is not actually used to lookup the resulting object in CDO. Only the CDOView is used for
this lookup! This means that this resource can be used to resolve any fragment with a CDOID of the
associated CDOView.
- Specified by:
getEObject in interface org.eclipse.emf.ecore.resource.Resource
getURIFragment
public java.lang.String getURIFragment(org.eclipse.emf.ecore.EObject object)
- Specified by:
getURIFragment in interface org.eclipse.emf.ecore.resource.Resource
load
public void load(java.io.InputStream inputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Specified by:
load in interface org.eclipse.emf.ecore.resource.Resource
- Throws:
java.io.IOException
cdoInternalPreLoad
public void cdoInternalPreLoad()
- Specified by:
cdoInternalPreLoad in interface InternalCDOLoadable- Overrides:
cdoInternalPreLoad in class org.eclipse.emf.internal.cdo.CDOObjectImpl
- Since:
- 2.0
load
public void load(java.util.Map<?,?> options)
throws java.io.IOException
- Specified by:
load in interface org.eclipse.emf.ecore.resource.Resource
- Throws:
java.io.IOException
save
public void save(java.util.Map<?,?> options)
throws java.io.IOException
- Specified by:
save in interface org.eclipse.emf.ecore.resource.Resource
- Throws:
java.io.IOException
save
public void save(java.io.OutputStream outputStream,
java.util.Map<?,?> options)
throws java.io.IOException
- Specified by:
save in interface org.eclipse.emf.ecore.resource.Resource
- Throws:
java.io.IOException
unload
public void unload()
- Specified by:
unload in interface org.eclipse.emf.ecore.resource.Resource
delete
public void delete(java.util.Map<?,?> options)
throws java.io.IOException
- Description copied from interface:
CDOResourceNode
deletes the resource using the specified options, unloads
it, and then removes it from the containing resource set.
Options are handled generically as feature-to-setting entries; the resource will ignore options it doesn't
recognize. The options could even include things like an Eclipse progress monitor...
An implementation typically uses the URI converter of the
containing resource set to URIConverter.delete(URI, Map) the resource's
URI.
- Specified by:
delete in interface CDOResourceNode- Specified by:
delete in interface org.eclipse.emf.ecore.resource.Resource
- Throws:
java.io.IOException
attached
public void attached(org.eclipse.emf.ecore.EObject object)
- Specified by:
attached in interface org.eclipse.emf.ecore.resource.Resource.Internal
detached
public void detached(org.eclipse.emf.ecore.EObject object)
- Specified by:
detached in interface org.eclipse.emf.ecore.resource.Resource.Internal
basicSetResourceSet
public org.eclipse.emf.common.notify.NotificationChain basicSetResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.notify.NotificationChain notifications)
- Specified by:
basicSetResourceSet in interface org.eclipse.emf.ecore.resource.Resource.Internal
- See Also:
ResourceImpl.basicSetResourceSet(ResourceSet, NotificationChain)
isLoading
public boolean isLoading()
- Specified by:
isLoading in interface org.eclipse.emf.ecore.resource.Resource.Internal
isExisting
public boolean isExisting()
- Specified by:
isExisting in interface CDOResource
createList
protected org.eclipse.emf.common.util.EList<?> createList(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
- Overrides:
createList in class org.eclipse.emf.internal.cdo.CDOObjectImpl