org.eclipse.ocl.examples.modelregistry.environment
Interface ModelResolver

All Known Implementing Classes:
AbstractModelResolver, ModelFileResolver, ModelResourceResolver

public interface ModelResolver


Method Summary
 org.eclipse.emf.ecore.resource.Resource getEcoreResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
          Return the Ecore Resource for uri optionally loading it if not already loaded.
 FileHandle getHandle()
           
 ProjectRegistry getProjectRegistry()
          Return the project registry, creating and loading it if not already loaded.
 org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
          Return the EMF Resource for uri optionally loading it if not already loaded.
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
          Return the ResourceSet in which loaded resources are maintained.
<A extends Accessor<A>>
org.eclipse.emf.common.util.URI
getURI(A accessor)
          Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the accessor in the context of a file defined by its handle.
 org.eclipse.emf.common.util.URI getURI(java.lang.String modelName)
          Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the modelName in the context of a file defined by its handle.
 org.eclipse.emf.common.util.URI getURI(java.net.URI uri)
          Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the (java.net.URI) uri in the context of a file defined by its handle.
 

Method Detail

getEcoreResource

org.eclipse.emf.ecore.resource.Resource getEcoreResource(org.eclipse.emf.common.util.URI uri,
                                                         boolean loadOnDemand)
                                                         throws java.lang.Exception
Return the Ecore Resource for uri optionally loading it if not already loaded.

Parameters:
uri -
loadOnDemand -
Returns:
Throws:
java.lang.Exception

getHandle

FileHandle getHandle()

getProjectRegistry

ProjectRegistry getProjectRegistry()
Return the project registry, creating and loading it if not already loaded.

Returns:
the project registry

getResource

org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri,
                                                    boolean loadOnDemand)
                                                    throws java.lang.Exception
Return the EMF Resource for uri optionally loading it if not already loaded. This is equivalent to getResourceSet().getResource().

Parameters:
uri -
loadOnDemand -
Returns:
Throws:
java.lang.Exception

getResourceSet

org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Return the ResourceSet in which loaded resources are maintained.

Returns:
the resource set.

getURI

<A extends Accessor<A>> org.eclipse.emf.common.util.URI getURI(A accessor)
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the accessor in the context of a file defined by its handle.

Parameters:
accessor - the name and type of resource to be located.
Returns:
the Ecore URI

getURI

org.eclipse.emf.common.util.URI getURI(java.lang.String modelName)
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the modelName in the context of a file defined by its handle. This is just a convenience form of getURI(resource, new ModelNameAccessor(modelName)).

Parameters:
modelName - the name of the model to be located.
Returns:
the Ecore URI

getURI

org.eclipse.emf.common.util.URI getURI(java.net.URI uri)
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the (java.net.URI) uri in the context of a file defined by its handle. This is just a convenience form of getURI(resource, new URIAccessor(uri)).

Parameters:
uri - the URI name of the model to be located.
Returns:
the Ecore URI