org.eclipse.emf.ecore.resource.impl
Class ResourceSetImpl.ResourceLocator

java.lang.Object
  extended by org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.ResourceLocator
Direct Known Subclasses:
ResourceSetImpl.MappedResourceLocator
Enclosing class:
ResourceSetImpl

public abstract static class ResourceSetImpl.ResourceLocator
extends java.lang.Object

A utility class for efficiently locating resources in a resource set. It provides utility methods for delegating to a ResourceSetImpl's protected methods so that derived classes have access to the resource set's full set of protected methods.

Since:
2.8

Field Summary
protected  ResourceSetImpl resourceSet
          The resource set for which this acts as an efficient lookup mechanism.
 
Constructor Summary
ResourceSetImpl.ResourceLocator(ResourceSetImpl resourceSet)
          Creates an instance for the given resource set, and sets the resource set's resource locator.
 
Method Summary
protected  Resource delegatedGetResource(URI uri, boolean loadOnDemand)
          Delegates to the resource set's ResourceSetImpl.delegatedGetResource(URI, boolean).
protected  Resource demandCreateResource(URI uri)
          Delegates to the resource set's ResourceSetImpl.demandCreateResource(URI).
protected  void demandLoad(Resource resource)
          Delegates to the resource set's ResourceSetImpl.demandLoad(Resource).
protected  void demandLoadHelper(Resource resource)
          Delegates to the resource set's ResourceSetImpl.demandLoadHelper(Resource).
abstract  Resource getResource(URI uri, boolean loadOnDemand)
          The utility method used by a resource set for locating a resource.
protected  void handleDemandLoadException(Resource resource, java.io.IOException exception)
          Delegates to the resource set's ResourceSetImpl.handleDemandLoadException(Resource, IOException).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceSet

protected final ResourceSetImpl resourceSet
The resource set for which this acts as an efficient lookup mechanism.

Constructor Detail

ResourceSetImpl.ResourceLocator

public ResourceSetImpl.ResourceLocator(ResourceSetImpl resourceSet)
Creates an instance for the given resource set, and sets the resource set's resource locator.

Method Detail

getResource

public abstract Resource getResource(URI uri,
                                     boolean loadOnDemand)
The utility method used by a resource set for locating a resource. It must implement the full logic needed to locate a resource, including delegated lookup and demand creation.


demandCreateResource

protected Resource demandCreateResource(URI uri)
Delegates to the resource set's ResourceSetImpl.demandCreateResource(URI).


demandLoad

protected void demandLoad(Resource resource)
                   throws java.io.IOException
Delegates to the resource set's ResourceSetImpl.demandLoad(Resource).

Throws:
java.io.IOException

demandLoadHelper

protected void demandLoadHelper(Resource resource)
Delegates to the resource set's ResourceSetImpl.demandLoadHelper(Resource).


handleDemandLoadException

protected void handleDemandLoadException(Resource resource,
                                         java.io.IOException exception)
                                  throws java.lang.RuntimeException
Delegates to the resource set's ResourceSetImpl.handleDemandLoadException(Resource, IOException).

Throws:
java.lang.RuntimeException

delegatedGetResource

protected Resource delegatedGetResource(URI uri,
                                        boolean loadOnDemand)
Delegates to the resource set's ResourceSetImpl.delegatedGetResource(URI, boolean).


Copyright 2001-2012 IBM Corporation and others.
All Rights Reserved.