@ParametersAreNonnullByDefault public class DefaultPersistentResource extends org.eclipse.emf.ecore.resource.impl.ResourceImpl implements PersistentResource
PersistentResource
that contains PersistentEObject
.
DefaultPersistentResource
s are backend-agnostic and only delegate model element operations to their internal
Store
which is responsible of database access.
PersistentStoreAdapter
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapter
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList
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
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, unloadingContents, uri, warnings
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
ROOT_ID, ROOT_REFERENCE_ID, ROOT_REFERENCE_NAME
OPTION_CIPHER, OPTION_LINE_DELIMITER, OPTION_LINE_DELIMITER_UNSPECIFIED, 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
Constructor and Description |
---|
DefaultPersistentResource(org.eclipse.emf.common.util.URI uri)
Constructs a new
DefaultPersistentResource with the given uri . |
Modifier and Type | Method and Description |
---|---|
<T extends org.eclipse.emf.ecore.EObject> |
allInstancesOf(org.eclipse.emf.ecore.EClass eClass,
boolean strict)
Computes the set of instances of the given
EClass . |
void |
close() |
protected void |
doUnload() |
StoreAdapter |
eStore()
Returns the store used to store the model.
|
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(String uriFragment) |
protected List<org.eclipse.emf.ecore.EObject> |
getUnloadingContents() |
String |
getURIFragment(org.eclipse.emf.ecore.EObject eObject) |
void |
load(ImmutableConfig config)
Loads the resource using the specified configuration.
|
void |
load(Map<?,?> options) |
void |
save(ImmutableConfig config)
Saves the resource using the specified configuration.
|
void |
save(Map<?,?> options) |
org.eclipse.emf.common.notify.Notification |
setLoaded(boolean isLoaded) |
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, doLoad, doSave, getAllProperContents, getAllProperContents, getDefaultURIConverter, getEObject, getEObjectByID, getEObjectForURIFragmentRootSegment, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getURI, getURIConverter, getURIFragmentRootSegment, getWarnings, handleLoadResponse, handleSaveResponse, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setModified, setTimeStamp, setTrackingModification, setURI, toKeyString, toString, unload, unloaded, useZip
eAdapters, eBasicAdapters, eDeliver, eSetDeliver
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allInstancesOf, isPersistent, iterator
attached, basicSetResourceSet, detached, isLoading
delete, getErrors, getResourceSet, getTimeStamp, getURI, getWarnings, isLoaded, isModified, isTrackingModification, load, save, setModified, setTimeStamp, setTrackingModification, setURI, unload
eAdapters, eDeliver, eNotify, eSetDeliver
forEach, spliterator
public DefaultPersistentResource(org.eclipse.emf.common.util.URI uri)
DefaultPersistentResource
with the given uri
.uri
- the URI of the resource@Nonnull public org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EObject> getContents()
getContents
in interface org.eclipse.emf.ecore.resource.Resource
getContents
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
@Nonnull public org.eclipse.emf.common.util.TreeIterator<org.eclipse.emf.ecore.EObject> getAllContents()
getAllContents
in interface org.eclipse.emf.ecore.resource.Resource
getAllContents
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
@Nonnull public String getURIFragment(org.eclipse.emf.ecore.EObject eObject)
getURIFragment
in interface org.eclipse.emf.ecore.resource.Resource
getURIFragment
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
public org.eclipse.emf.ecore.EObject getEObject(String uriFragment)
getEObject
in interface org.eclipse.emf.ecore.resource.Resource
getEObject
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
public void save(Map<?,?> options)
save
in interface org.eclipse.emf.ecore.resource.Resource
save
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
public void load(Map<?,?> options) throws IOException
load
in interface org.eclipse.emf.ecore.resource.Resource
load
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
IOException
public org.eclipse.emf.common.notify.Notification setLoaded(boolean isLoaded)
setLoaded
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
protected List<org.eclipse.emf.ecore.EObject> getUnloadingContents()
getUnloadingContents
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
protected void doUnload()
doUnload
in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
public void close()
close
in interface PersistentResource
close
in interface Closeable
close
in interface AutoCloseable
public void save(ImmutableConfig config)
PersistentResource
save
in interface PersistentResource
config
- the save configurationResource.save(java.util.Map)
public void load(ImmutableConfig config) throws IOException
PersistentResource
load
in interface PersistentResource
config
- the load configurationIOException
- if an I/O error occurs during loadingResource.load(java.util.Map)
@Nonnull public <T extends org.eclipse.emf.ecore.EObject> Iterable<T> allInstancesOf(org.eclipse.emf.ecore.EClass eClass, boolean strict)
PersistentResource
EClass
.allInstancesOf
in interface PersistentResource
eClass
- the EClass
for which look for instancesstrict
- true
if the lookup searches for strict instancestrue
then the method returns only the strict instances of the given EClass
, otherwise
it also returns the instances of the sub-types of eClass
.@Nonnull public StoreAdapter eStore()
Storable
Copyright © 2013–2019 Atlanmod. All rights reserved.