org.eclipse.gmt.umlx.registry.model
Class ProjectRegistry

java.lang.Object
  extended by org.eclipse.gmt.umlx.registry.model.ProjectRegistry

public class ProjectRegistry
extends java.lang.Object

A ProjectRegistry instance forms the root of a model registry. It provides the in memory form of the org.eclipse.gmt.umlx.registry.modelregistry model read from and updated in the project .settings folder. The ProjectRegistry contains a ResourceRegistry for each resource for which models are registered. The ResourceRegistry in turn contains an AccessorRegistry for each Accessor class and the AccessorRegistry contains the model Registrations.


Field Summary
static java.lang.String DEFAULT_MODEL_REGISTRY_NAME
           
static java.lang.String DEFAULT_SERIALISATION_NAME
           
 
Constructor Summary
ProjectRegistry(org.eclipse.core.resources.IProject project, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 
Method Summary
 ResourceRegistry add(org.eclipse.core.resources.IResource resource)
           
<A extends Accessor>
Registration<A>
add(Registration<A> registration)
           
 ResourceRegistry get(org.eclipse.core.resources.IResource resource)
           
 ResourceRegistry getOrCreate(org.eclipse.core.resources.IResource resource)
           
 org.eclipse.core.resources.IProject getProject()
           
 org.eclipse.emf.common.util.URI getRegistryURI()
           
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
 boolean loadModel()
           
<A extends Accessor>
Registration<A>
remove(Registration<A> registration)
           
 boolean saveModel()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SERIALISATION_NAME

public static final java.lang.String DEFAULT_SERIALISATION_NAME
See Also:
Constant Field Values

DEFAULT_MODEL_REGISTRY_NAME

public static final java.lang.String DEFAULT_MODEL_REGISTRY_NAME
See Also:
Constant Field Values
Constructor Detail

ProjectRegistry

public ProjectRegistry(org.eclipse.core.resources.IProject project,
                       org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Method Detail

add

public ResourceRegistry add(org.eclipse.core.resources.IResource resource)

add

public <A extends Accessor> Registration<A> add(Registration<A> registration)

get

public ResourceRegistry get(org.eclipse.core.resources.IResource resource)

getOrCreate

public ResourceRegistry getOrCreate(org.eclipse.core.resources.IResource resource)

getProject

public org.eclipse.core.resources.IProject getProject()

getRegistryURI

public org.eclipse.emf.common.util.URI getRegistryURI()

getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()

loadModel

public boolean loadModel()

remove

public <A extends Accessor> Registration<A> remove(Registration<A> registration)

saveModel

public boolean saveModel()

toString

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