|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.MappedResourceLocator
public static class ResourceSetImpl.MappedResourceLocator
An implementation of a ResourceSetImpl.ResourceLocator
that maintains cached mappings for
the normalized URIs
and the resource set's resources
.
Nested Class Summary | |
---|---|
class |
ResourceSetImpl.MappedResourceLocator.ResourceAdapter
A content adapter that listens to the resource set
for resources being added and removed,
as well as to the resources in the resource set for changes to the resource's URI . |
Field Summary | |
---|---|
protected URIConverter |
cachedURIConverter
The cached URI converter used to calculate the cached normalization and resource mappings. |
protected int |
expectedModificationCount
The cached modification count of the cached URI converter . |
protected java.util.Map<URI,URI> |
normalizationMap
The cached mappings from URIs to their normalized form. |
protected java.util.Map<URI,EList<Resource>> |
resourceMap
The cached mapping from normalized URIs to their corresponding resources. |
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator |
---|
resourceSet |
Constructor Summary | |
---|---|
ResourceSetImpl.MappedResourceLocator(ResourceSetImpl resourceSet)
Creates an instance of the given resource set. |
Method Summary | |
---|---|
protected void |
buildMaps()
Builds entries for the resource set's resource in the normalized map and the resource map . |
protected boolean |
cacheURIConverter()
Caches the URI converter,
checking that it's the same as the ResourceLocator#resourceSet's current URI converter
and that the modification count of the URI map
is the same as the expected modification count ,
building normalization and resource maps, if necessary. |
Resource |
getResource(URI uri,
boolean loadOnDemand)
The utility method used by a resource set for locating a resource. |
protected void |
map(URI normalizedURI,
Resource resource)
Creates a resource map entry for the resource with the given normalized URI. |
protected int |
modificationCount()
Determines modification count of the cached URI converter . |
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator |
---|
delegatedGetResource, demandCreateResource, demandLoad, demandLoadHelper, handleDemandLoadException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected URIConverter cachedURIConverter
URI converter
used to calculate the cached normalization
and resource
mappings.
protected int expectedModificationCount
modification count
of the cached URI converter
.
protected java.util.Map<URI,URI> normalizationMap
normalized
form.
protected java.util.Map<URI,EList<Resource>> resourceMap
resource set
with any resources not in the resource set, i.e., those located by delegation
,
appearing after those found in the resource set itself.
Constructor Detail |
---|
public ResourceSetImpl.MappedResourceLocator(ResourceSetImpl resourceSet)
Method Detail |
---|
protected void map(URI normalizedURI, Resource resource)
resource map
entry for the resource with the given normalized URI.
protected void buildMaps()
resource set's
resource in the normalized map
and the resource map
.
protected int modificationCount()
modification count
of the cached URI converter
.
protected boolean cacheURIConverter()
Caches
the URI converter,
checking that it's the same as the ResourceLocator#resourceSet's
current URI converter
and that the modification count
of the URI map
is the same as the expected modification count
,
building
normalization and resource maps, if necessary.
public Resource getResource(URI uri, boolean loadOnDemand)
ResourceSetImpl.ResourceLocator
locating
a resource.
It must implement the full logic needed to locate a resource,
including delegated lookup
and demand creation
.
getResource
in class ResourceSetImpl.ResourceLocator
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |