public class ScopingResourceSetImpl extends ExtendedResourceSetImpl implements ScopingResourceSet
ScopingResourceSet interface.ExtendedResourceSetImpl.ExtendedResourcesEList<E extends java.lang.Object & org.eclipse.emf.ecore.resource.Resource>, ExtendedResourceSetImpl.ResourceFilterorg.eclipse.emf.ecore.resource.impl.ResourceSetImpl.MappedResourceLocator, org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator, org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourcesEList<E extends java.lang.Object & org.eclipse.emf.ecore.resource.Resource>org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterListcontextAwareProxyURIHelper, proxyHelperadapterFactories, loadOptions, packageRegistry, resourceFactoryRegistry, resourceLocator, resources, uriConverter, uriResourceMap| Constructor and Description |
|---|
ScopingResourceSetImpl()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected IResourceScope |
createOutsideWorkspaceScope()
Creates the
resource scope used to encompass all resources that are located outside of the
workspace. |
protected java.util.Map<IResourceScope,java.util.Set<IMetaModelDescriptor>> |
getContextResourceScopes(java.lang.Object contextObject)
Retrieves a map that is keyed by the
resource scopes behind given context object and
yields the descriptors of the metamodels using them. |
protected org.eclipse.emf.ecore.EObject |
getEObject(org.eclipse.emf.common.util.URI uri,
IMetaModelDescriptor targetMetaModelDescriptor,
java.lang.Object contextObject,
boolean loadOnDemand)
Retrieves the object from specified target
metamodel that
corresponds to given URI. |
protected IResourceScope |
getOutsideWorkspaceScope()
Returns the
resource scope used to encompass all resources that are located outside of the
workspace. |
java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesInModel(java.lang.Object contextObject)
Retrieves all
resources in this resourceset owned by the model containing
the context object and its referenced models. |
java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesInModel(java.lang.Object contextObject,
boolean includeReferencedScopes)
Retrieves all
resources in this resourceset owned by the model containing
the context object. |
java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesInScope(java.lang.Object contextObject)
Retrieves all
resources in this resourceset owned by the
resource scope containing the context object and its referenced resource scopes. |
java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesInScope(java.lang.Object contextObject,
boolean includeReferencedScopes)
Retrieves all
resources in this resourceset owned by the
resource scope containing the context object. |
protected java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesInScope(java.lang.Object contextObject,
boolean includeReferencedScopes,
boolean ignoreMetaModel)
Retrieves the
resources contained by this resource set that belong to the
resource scope(s) behind provided contextObject. |
protected java.util.List<org.eclipse.emf.ecore.resource.Resource> |
getResourcesToSearchIn(org.eclipse.emf.common.util.URI uri,
boolean loadOnDemand,
org.eclipse.emf.ecore.EObject contextObject)
Deprecated.
|
protected boolean |
hasMatchingMetaModel(java.util.Set<IMetaModelDescriptor> mmDescriptors,
org.eclipse.emf.ecore.resource.Resource resource) |
boolean |
isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject)
|
boolean |
isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject,
boolean includeReferencedScopes)
|
protected boolean |
isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject,
boolean includeReferencedScopes,
boolean ignoreMetaModel)
|
augmentToContextAwareProxy, createContextAwareURIHelper, createProxyHelper, demandCreateResource, demandLoad, getContextContainer, getDelegateResourceSet, getEObject, getEObject, getFilteredResources, getModCount, getProxyResolverService, getResource, getResources, getResourcesToSearchIn, loadModels, safeFindEObjectInResources, safeGetEObjectFromResource, safeGetResource, trimProxyContextInfocreateResource, createResource, delegatedGetResource, demandLoadHelper, getAdapterFactories, getAllContents, getLoadOptions, getPackageRegistry, getResourceFactoryRegistry, getURIConverter, getURIResourceMap, handleDemandLoadException, setPackageRegistry, setResourceFactoryRegistry, setURIConverter, setURIResourceMap, toStringeAdapters, eBasicAdapters, eDeliver, eSetDelivereBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaugmentToContextAwareProxy, getEObject, trimProxyContextInfocreateResource, createResource, getAdapterFactories, getAllContents, getEObject, getLoadOptions, getPackageRegistry, getResource, getResourceFactoryRegistry, getResources, getURIConverter, setPackageRegistry, setResourceFactoryRegistry, setURIConverterprotected IResourceScope getOutsideWorkspaceScope()
resource scope used to encompass all resources that are located outside of the
workspace.protected IResourceScope createOutsideWorkspaceScope()
resource scope used to encompass all resources that are located outside of the
workspace.public java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesInModel(java.lang.Object contextObject)
ScopingResourceSetresources in this resourceset owned by the model containing
the context object and its referenced models.getResourcesInModel in interface ScopingResourceSetcontextObject - A context object for which a list of resources should be retrieved.public java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesInModel(java.lang.Object contextObject,
boolean includeReferencedScopes)
ScopingResourceSetresources in this resourceset owned by the model containing
the context object.getResourcesInModel in interface ScopingResourceSetcontextObject - A context object for which a list of resources should be retrieved.includeReferencedScopes - A boolean value that let to decide if resources must be retrieved under depending roots of the
concerned modelpublic java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesInScope(java.lang.Object contextObject)
ScopingResourceSetresources in this resourceset owned by the
resource scope containing the context object and its referenced resource scopes.getResourcesInScope in interface ScopingResourceSetcontextObject - A context object for which a list of resources should be retrieved.public java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesInScope(java.lang.Object contextObject,
boolean includeReferencedScopes)
ScopingResourceSetresources in this resourceset owned by the
resource scope containing the context object.getResourcesInScope in interface ScopingResourceSetcontextObject - A context object for which a list of resources should be retrieved.includeReferencedScopes - A boolean value that let to decide if resources must be retrieved under depending roots of the
concerned model.protected java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesInScope(java.lang.Object contextObject,
boolean includeReferencedScopes,
boolean ignoreMetaModel)
resources contained by this resource set that belong to the
resource scope(s) behind provided contextObject.contextObject - The context object the resource scope to refer to.includeReferencedScopes - true if the resources of resource scopes that are referenced by the resource scope behind
the context object are to be retrieved as well, false if only the resources of the
resource scope behind the context object are to be retrieved.ignoreMetaModel - true if the resources should be retrieved regardless whether their metamodel descriptor
matches that behind the context object, false if the metamodel descriptors of the
resources and the context object are required to match.contextObject.public boolean isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject)
ScopingResourceSetisResourceInScope in interface ScopingResourceSetresource - The resource to be investigated.contextObject - The context object identifying the resource scope to refer to.true if given resource belongs to the resource scope behind provided
contextObject, or false otherwise.public boolean isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject,
boolean includeReferencedScopes)
ScopingResourceSetisResourceInScope in interface ScopingResourceSetresource - The resource to be investigated.contextObject - The context object identifying the resource scope to refer to.includeReferencedScopes - true if the resource scopes that are referenced by the resource scope behind the context
object are to be considered as well, false if only the resource scope behind the context
object is to be considered.true if given resource belongs to the resource scope behind provided
contextObject, or false otherwise.protected boolean isResourceInScope(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.Object contextObject,
boolean includeReferencedScopes,
boolean ignoreMetaModel)
resource - The resource to be investigated.contextObject - The context object identifying the resource scope to refer to.includeReferencedScopes - true if the resource scopes that are referenced by the resource scope behind the context
object are to be considered as well, false if only the resource scope behind the context
object is to be considered.ignoreMetaModel - true if the given resource should be considered to belong to the resource scope behind
the context object regardless whether its metamodel descriptor matches that of the context object,
false if the metamodel descriptors of the given resource and the context object are
required to match.true if given resource belongs to the resource scope behind provided
contextObject, or false otherwise.protected java.util.Map<IResourceScope,java.util.Set<IMetaModelDescriptor>> getContextResourceScopes(java.lang.Object contextObject)
resource scopes behind given context object and
yields the descriptors of the metamodels using them.contextObject - The context object to retrieve the resource scopes for.protected boolean hasMatchingMetaModel(java.util.Set<IMetaModelDescriptor> mmDescriptors, org.eclipse.emf.ecore.resource.Resource resource)
protected org.eclipse.emf.ecore.EObject getEObject(org.eclipse.emf.common.util.URI uri,
IMetaModelDescriptor targetMetaModelDescriptor,
java.lang.Object contextObject,
boolean loadOnDemand)
ExtendedResourceSetImplmetamodel that
corresponds to given URI. Uses provided to limit the search scope
to the subset of resources that are in the same scope as the resource.getEObject in class ExtendedResourceSetImpluri - The URI to be resolved.targetMetaModelDescriptor - The meta model descriptor of the object that is referenced by given URI.contextObject - The context resource that is used to limit the search scope.loadOnDemand - Whether to load the resource or model containing the object that is referenced by given URI if it is
not already loaded.null if given URI cannot be resolved.@Deprecated
protected java.util.List<org.eclipse.emf.ecore.resource.Resource> getResourcesToSearchIn(org.eclipse.emf.common.util.URI uri,
boolean loadOnDemand,
org.eclipse.emf.ecore.EObject contextObject)
ExtendedResourceSetImpl.getResourcesToSearchIn(List, URI, IMetaModelDescriptor) instead.resources to be considered for resolving given URI. Only called
when given URI is fragment-based (i.e., has no segments and doesn't reference any explicit target resource).
This implementation uses the provided context object, if not null, to retrieve the
resources in scope, and returns all resources in
this resource set otherwise. Clients may override this method in order to tweak
the set of resources used for resolving fragment-based URIs.
uri - The fragment-based URI to resolve.loadOnDemand - Whether to create and load the target resource, if it isn't already present in this
resource set.contextObject - The context object used to determine the set of resources to be
considered for resolving given fragment-based URI.resources to be considered for resolving given fragment-based URI.getResourcesInScope(Object),
ExtendedResourceSetImpl.getResources()