public class CDOResourceImpl extends CDOResourceLeafImpl implements InternalCDOResource
The following features are implemented:
Modifier and Type | Class and Description |
---|---|
protected class |
CDOResourceImpl.ContentsCDOList
An implementation of a CDO specific 'contents' list.
|
MinimalEObjectImpl.Container
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException
InternalEObject.EStore
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
OPTION_SAVE_BASE_URI, OPTION_SAVE_OVERRIDE_TRANSACTION, OPTION_SAVE_PROGRESS_MONITOR, PREFETCH_PARAMETER
ROOT_NAME, ROOT_PATH
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
EOPPOSITE_FEATURE_BASE
NIL
Modifier | Constructor and Description |
---|---|
protected |
CDOResourceImpl() |
|
CDOResourceImpl(URI initialURI) |
Modifier and Type | Method and Description |
---|---|
void |
attached(EObject object) |
NotificationChain |
basicSetResourceSet(ResourceSet resourceSet,
NotificationChain notifications) |
void |
cdoInternalLoading(EObject object)
Informs the resource that an
object contained within it is being loaded. |
void |
cdoInternalLoadingDone(EObject object)
Informs the resource that an
object contained within it has finished being loaded. |
void |
cdoInternalPostDetach(boolean remote)
It is really important for accessing the data to go through
CDOObjectImpl.cdoStore() . |
void |
cdoInternalPreLoad() |
protected EList<?> |
createList(EStructuralFeature eStructuralFeature) |
void |
delete(Map<?,?> options) |
void |
detached(EObject object) |
int |
eBaseStructuralFeatureID(int derivedFeatureID,
Class<?> baseClass) |
int |
eDerivedStructuralFeatureID(int baseFeatureID,
Class<?> baseClass) |
Resource.Internal |
eDirectResource() |
Object |
eGet(int featureID,
boolean resolve,
boolean coreType) |
void |
eSet(int featureID,
Object newValue) |
protected EClass |
eStaticClass() |
TreeIterator<EObject> |
getAllContents() |
protected TreeIterator<EObject> |
getAllProperContents(List<EObject> contents) |
EList<EObject> |
getContents() |
EObject |
getEObject(String uriFragment)
Note: URI from temporary objects are going to changed when we commit the CDOTransaction.
|
protected EObject |
getEObjectByID(String id)
Returns the object based on the fragment as an ID.
|
EList<Resource.Diagnostic> |
getErrors() |
Map<String,EObject> |
getIntrinsicIDToEObjectMap()
Returns the map used to cache the EObject that is identified by the
value
of its ID feature. |
ResourceSet |
getResourceSet() |
long |
getTimeStamp() |
URI |
getURI() |
String |
getURIFragment(EObject object) |
URI |
getURIGen() |
EList<Resource.Diagnostic> |
getWarnings() |
boolean |
isExisting() |
boolean |
isLoaded() |
boolean |
isLoading() |
boolean |
isModified() |
boolean |
isRoot() |
boolean |
isTrackingModification() |
void |
load(InputStream inputStream,
Map<?,?> options) |
void |
load(Map<?,?> options) |
void |
save(Map<?,?> options) |
void |
save(OutputStream outputStream,
Map<?,?> options) |
protected void |
setExisting(boolean existing) |
void |
setIntrinsicIDToEObjectMap(Map<String,EObject> intrinsicIDToEObjectMap)
Sets the map used to cache the EObject identified by the value of its ID feature.
|
void |
setModified(boolean newModified) |
void |
setResourceSet(ResourceSet newResourceSet) |
void |
setRoot(boolean root) |
void |
setTimeStamp(long newTimeStamp) |
void |
setTrackingModification(boolean newTrackingModification) |
void |
setTrackingModificationGen(boolean newTrackingModification) |
void |
setURI(URI newURI) |
void |
setURIGen(URI newURI) |
void |
unload() |
basicSetFolder, basicSetName, eStaticFeatureCount, getFolder, getName, getPath, setFolder, setFolderGen, setName, setNameGen, setPath
cdoClassInfo, cdoConflict, cdoDirectResource, cdoHistory, cdoID, cdoInternalDynamicFeature, cdoInternalInstance, cdoInternalPostAttach, cdoInternalPostInvalidate, cdoInternalPostLoad, cdoInternalPostRollback, cdoInternalPreCommit, cdoInternalSetID, cdoInternalSetResource, cdoInternalSetRevision, cdoInternalSetState, cdoInternalSetView, cdoInvalid, cdoLockState, cdoPrefetch, cdoReadLock, cdoReload, cdoResource, cdoRevision, cdoState, cdoView, cdoWriteLock, cdoWriteOption, createFeatureMap, createLock, createMap, createUnorderedList, dynamicGet, dynamicSet, dynamicUnset, eAdapterAdded, eAdapterRemoved, eBasicAdapterListeners, eBasicSetAdapterListeners, eBasicSetContainer, eBasicSetContainer, eBasicSetSettings, eBasicSettings, eClass, eContainerAdapterArray, eContainerFeatureID, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicIsSet, eHasSettings, eInternalContainer, eInternalResource, eIsCaching, equals, eSetClass, eSetDirectResource, eSetResource, eSettings, eStore, getLockState, hashCode, instanceToRevisionFeature, revisionToInstanceFeature, toString
eBasicContainerFeatureID, eBasicInternalContainer, eBasicSetAdapterArray, eDerivedStructuralFeatureID
eAdapters, eBasicAdapterArray, eBasicAdapters, eBasicHasAdapters, eBasicProperties, eBasicSetContainer, eBasicSetContainerFeatureID, eContents, eCrossReferences, eDeliver, eIsProxy, eProperties, eProxyURI, eSetDeliver, eSetProxyURI
eAddVirtualValue, eAllContents, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedOperationID, eDerivedOperationID, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvocationDelegate, eInvoke, eInvoke, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetStore, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticOperationCount, eUnset, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
eNotificationRequired, eNotify
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFolder, getName, getPath, setFolder, setName, setPath
cdoConflict, cdoDirectResource, cdoHistory, cdoID, cdoInvalid, cdoLockState, cdoPrefetch, cdoReadLock, cdoReload, cdoResource, cdoRevision, cdoState, cdoView, cdoWriteLock, cdoWriteOption
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
eAdapters, eDeliver, eNotify, eSetDeliver
eBasicRemoveFromContainer, eDerivedOperationID, eGet, eInverseAdd, eInverseRemove, eInvoke, eIsSet, eNotificationRequired, eObjectForURIFragmentSegment, eProxyURI, eResolveProxy, eSetProxyURI, eSetStore, eSetting, eUnset, eURIFragmentSegment
public CDOResourceImpl(URI initialURI)
protected CDOResourceImpl()
protected EClass eStaticClass()
eStaticClass
in class CDOResourceLeafImpl
public Resource.Internal eDirectResource()
eDirectResource
in interface InternalEObject
eDirectResource
in class CDOObjectImpl
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
eDerivedStructuralFeatureID
in interface InternalEObject
eDerivedStructuralFeatureID
in class BasicEObjectImpl
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
eBaseStructuralFeatureID
in interface InternalEObject
eBaseStructuralFeatureID
in class BasicEObjectImpl
public boolean isRoot()
isRoot
in interface CDOResourceNode
public void setRoot(boolean root)
public ResourceSet getResourceSet()
getResourceSet
in interface CDOResource
getResourceSet
in interface Resource
CDOResource.setResourceSet(ResourceSet)
,
EresourcePackage.getCDOResource_ResourceSet()
public void setResourceSet(ResourceSet newResourceSet)
setResourceSet
in interface CDOResource
newResourceSet
- the new value of the 'Resource Set' attribute.CDOResource.getResourceSet()
public URI getURIGen()
public URI getURI()
getURI
in interface CDOResource
getURI
in interface CDOResourceNode
getURI
in interface Resource
getURI
in class CDOResourceNodeImpl
CDOResource.setURI(URI)
,
EresourcePackage.getCDOResource_URI()
public void setURIGen(URI newURI)
public void setURI(URI newURI)
setURI
in interface CDOResource
setURI
in interface Resource
newURI
- the new value of the 'URI' attribute.CDOResource.getURI()
public Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface InternalEObject
eGet
in class CDOResourceNodeImpl
public void eSet(int featureID, Object newValue)
eSet
in interface InternalEObject
eSet
in class CDOResourceNodeImpl
public EList<EObject> getContents()
getContents
in interface CDOResource
getContents
in interface Resource
EresourcePackage.getCDOResource_Contents()
public void cdoInternalPostDetach(boolean remote)
CDOObjectImpl
CDOObjectImpl.cdoStore()
. CDOObjectImpl.eStore()
will redirect
you to the transient data.cdoInternalPostDetach
in interface InternalCDOObject
cdoInternalPostDetach
in class CDOObjectImpl
public boolean isModified()
isModified
in interface CDOResource
isModified
in interface Resource
CDOResource.setModified(boolean)
,
EresourcePackage.getCDOResource_Modified()
public void setModified(boolean newModified)
setModified
in interface CDOResource
setModified
in interface Resource
newModified
- the new value of the 'Modified' attribute.CDOResource.isModified()
public boolean isLoaded()
isLoaded
in interface CDOResource
isLoaded
in interface Resource
EresourcePackage.getCDOResource_Loaded()
public boolean isTrackingModification()
isTrackingModification
in interface CDOResource
isTrackingModification
in interface Resource
CDOResource.setTrackingModification(boolean)
,
EresourcePackage.getCDOResource_TrackingModification()
public void setTrackingModificationGen(boolean newTrackingModification)
public void setTrackingModification(boolean newTrackingModification)
setTrackingModification
in interface CDOResource
setTrackingModification
in interface Resource
newTrackingModification
- the new value of the 'Tracking Modification' attribute.CDOResource.isTrackingModification()
public EList<Resource.Diagnostic> getErrors()
getErrors
in interface CDOResource
getErrors
in interface Resource
EresourcePackage.getCDOResource_Errors()
public EList<Resource.Diagnostic> getWarnings()
getWarnings
in interface CDOResource
getWarnings
in interface Resource
EresourcePackage.getCDOResource_Warnings()
public long getTimeStamp()
getTimeStamp
in interface CDOResource
getTimeStamp
in interface Resource
CDOResource.setTimeStamp(long)
,
EresourcePackage.getCDOResource_TimeStamp()
public void setTimeStamp(long newTimeStamp)
setTimeStamp
in interface CDOResource
setTimeStamp
in interface Resource
newTimeStamp
- the new value of the 'Time Stamp' attribute.CDOResource.getTimeStamp()
public TreeIterator<EObject> getAllContents()
getAllContents
in interface Resource
ResourceImpl.getAllContents()
public EObject getEObject(String uriFragment)
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.
getEObject
in interface Resource
public Map<String,EObject> getIntrinsicIDToEObjectMap()
value
of its ID feature.setIntrinsicIDToEObjectMap(java.util.Map<java.lang.String, org.eclipse.emf.ecore.EObject>)
public void setIntrinsicIDToEObjectMap(Map<String,EObject> intrinsicIDToEObjectMap)
null
.
The map will be lazily loaded by the getEObjectByID
method.
It is up to the client to clear the cache when it becomes invalid,
e.g., when the ID of a previously mapped EObject is changed.intrinsicIDToEObjectMap
- the new map or null
.getIntrinsicIDToEObjectMap()
protected EObject getEObjectByID(String id)
protected TreeIterator<EObject> getAllProperContents(List<EObject> contents)
public String getURIFragment(EObject object)
getURIFragment
in interface Resource
public boolean isLoading()
isLoading
in interface Resource.Internal
public void cdoInternalLoading(EObject object)
InternalCDOResource
object
contained within it is being loaded.cdoInternalLoading
in interface InternalCDOResource
public void cdoInternalLoadingDone(EObject object)
InternalCDOResource
object
contained within it has finished being loaded.cdoInternalLoadingDone
in interface InternalCDOResource
public void cdoInternalPreLoad()
cdoInternalPreLoad
in interface InternalCDOLoadable
cdoInternalPreLoad
in class CDOObjectImpl
public void load(InputStream inputStream, Map<?,?> options) throws IOException
load
in interface Resource
IOException
public void load(Map<?,?> options) throws IOException
load
in interface Resource
IOException
public void save(Map<?,?> options) throws IOException
save
in interface Resource
IOException
public void save(OutputStream outputStream, Map<?,?> options) throws IOException
save
in interface Resource
IOException
public void delete(Map<?,?> options) throws IOException
delete
in interface CDOResourceNode
delete
in interface Resource
IOException
public void attached(EObject object)
attached
in interface Resource.Internal
public void detached(EObject object)
detached
in interface Resource.Internal
public NotificationChain basicSetResourceSet(ResourceSet resourceSet, NotificationChain notifications)
basicSetResourceSet
in interface Resource.Internal
ResourceImpl.basicSetResourceSet(ResourceSet, NotificationChain)
public boolean isExisting()
isExisting
in interface CDOResource
protected void setExisting(boolean existing)
protected EList<?> createList(EStructuralFeature eStructuralFeature)
createList
in class CDOObjectImpl
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.