org.eclipse.gmt.umlx.registry.environment
Class AbstractModelResolver

java.lang.Object
  extended by org.eclipse.gmt.umlx.registry.environment.AbstractModelResolver
All Implemented Interfaces:
ModelResolver
Direct Known Subclasses:
ModelFileResolver, ModelResourceResolver

public class AbstractModelResolver
extends java.lang.Object
implements ModelResolver


Constructor Summary
AbstractModelResolver(AbstractFileHandle handle)
           
 
Method Summary
 ProjectRegistry getProjectRegistry()
          Return the project registry, creating and loading it if not already loaded.
<A extends Accessor>
Registration<A>
getRegistration(A accessor)
           
 Registration<ModelNameAccessor> getRegistration(java.lang.String modelName)
           
 Registration<URIAccessor> getRegistration(java.net.URI uri)
           
<A extends Accessor>
java.util.Collection<Registration<A>>
getRegistrations(java.lang.Class<A> accessorClass)
           
 org.eclipse.emf.ecore.resource.Resource getResource(Registration<ModelNameAccessor> registration)
           
 org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
           
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
 org.eclipse.emf.common.util.URI getURI(Accessor 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.
 void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Define the
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractModelResolver

public AbstractModelResolver(AbstractFileHandle handle)
Method Detail

getProjectRegistry

public ProjectRegistry getProjectRegistry()
Description copied from interface: ModelResolver
Return the project registry, creating and loading it if not already loaded.

Specified by:
getProjectRegistry in interface ModelResolver
Returns:
the project registry

getRegistration

public <A extends Accessor> Registration<A> getRegistration(A accessor)

getRegistration

public Registration<ModelNameAccessor> getRegistration(java.lang.String modelName)

getRegistration

public Registration<URIAccessor> getRegistration(java.net.URI uri)

getRegistrations

public <A extends Accessor> java.util.Collection<Registration<A>> getRegistrations(java.lang.Class<A> accessorClass)

getResource

public org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri,
                                                           boolean loadOnDemand)
                                                    throws java.lang.Exception
Specified by:
getResource in interface ModelResolver
Throws:
java.lang.Exception

getResource

public org.eclipse.emf.ecore.resource.Resource getResource(Registration<ModelNameAccessor> registration)
                                                    throws java.io.IOException
Throws:
java.io.IOException

getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Specified by:
getResourceSet in interface ModelResolver

getURI

public org.eclipse.emf.common.util.URI getURI(Accessor accessor)
Description copied from interface: ModelResolver
Return the (Ecore) URI suitable for getting the (Ecore) resource defined by the accessor in the context of a file defined by its handle.

Specified by:
getURI in interface ModelResolver
Parameters:
accessor - the name and type of resource to be located.
Returns:
the Ecore URI

getURI

public org.eclipse.emf.common.util.URI getURI(java.lang.String modelName)
Description copied from interface: ModelResolver
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)).

Specified by:
getURI in interface ModelResolver
Parameters:
modelName - the name of the model to be located.
Returns:
the Ecore URI

getURI

public org.eclipse.emf.common.util.URI getURI(java.net.URI uri)
Description copied from interface: ModelResolver
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)).

Specified by:
getURI in interface ModelResolver
Parameters:
uri - the URI name of the model to be located.
Returns:
the Ecore URI

setResourceSet

public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Define the

Parameters:
resourceSet -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object