java.lang.Objectorg.eclipse.gmt.umlx.registry.model.ProjectRegistry
public class ProjectRegistry
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 FileHandleRegistry for each file handle for which models are registered. The FileHandleRegistry in turn contains an AccessorRegistry for each Accessor class and the AccessorRegistry contains the model Registrations.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SERIALISATION_NAME
|
Constructor Summary | |
---|---|
ProjectRegistry(AbstractProjectHandle projectHandle,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
|
Method Summary | ||
---|---|---|
FileHandleRegistry |
add(AbstractFileHandle fileHandle)
|
|
|
add(Registration<A> registration)
|
|
FileHandleRegistry |
get(AbstractFileHandle fileHandle)
|
|
FileHandleRegistry |
getOrCreate(AbstractFileHandle fileHandle)
|
|
AbstractProjectHandle |
getProject()
|
|
|
getRegistration(AbstractFileHandle fileHandle,
A accessor)
Return the registration applicable to accessor in the context of fileHandle |
|
|
getRegistrations(AbstractFileHandle fileHandle,
java.lang.Class<A> accessorClass)
Return all registrations applicable to accessorClass in the context of fileHandle, typically to treat all such registrations as a look-up path. |
|
org.eclipse.emf.common.util.URI |
getResolvedURI(AbstractFileHandle fileHandle,
Accessor accessor)
Return the URI that resolves accessor within the context of fileHandle after resolution against the URI of the project. |
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
|
|
org.eclipse.emf.common.util.URI |
getURI(AbstractFileHandle fileHandle,
Accessor accessor)
Return the URI that resolves accessor within the context of fileHandle. |
|
boolean |
loadModel()
|
|
|
remove(Registration<A> registration)
|
|
org.eclipse.emf.common.util.URI |
resolveURI(org.eclipse.emf.common.util.URI uri)
Return the URI after resolution against the project file handle URI. |
|
boolean |
saveModel()
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SERIALISATION_NAME
Constructor Detail |
---|
public ProjectRegistry(AbstractProjectHandle projectHandle, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Method Detail |
---|
public FileHandleRegistry add(AbstractFileHandle fileHandle)
public <A extends Accessor> Registration<A> add(Registration<A> registration)
public FileHandleRegistry get(AbstractFileHandle fileHandle)
public FileHandleRegistry getOrCreate(AbstractFileHandle fileHandle)
public AbstractProjectHandle getProject()
public <A extends Accessor> Registration<A> getRegistration(AbstractFileHandle fileHandle, A accessor)
A
- kind of accessorfileHandle
- defining look-up contextaccessor
- name of accessor
public <A extends Accessor> java.util.Collection<Registration<A>> getRegistrations(AbstractFileHandle fileHandle, java.lang.Class<A> accessorClass)
Class
- kind of accessorfileHandle
- defining look-up contextaccessor
- name of accessor
public org.eclipse.emf.common.util.URI getResolvedURI(AbstractFileHandle fileHandle, Accessor accessor)
fileHandle
- defining look-up contextaccessor
- name and kind of accessor
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
public org.eclipse.emf.common.util.URI getURI(AbstractFileHandle fileHandle, Accessor accessor)
fileHandle
- defining look-up contextaccessor
- name and kind of accessor
public boolean loadModel()
public <A extends Accessor> Registration<A> remove(Registration<A> registration)
public org.eclipse.emf.common.util.URI resolveURI(org.eclipse.emf.common.util.URI uri)
uri
- uri to resolve
public boolean saveModel()
public java.lang.String toString()
toString
in class java.lang.Object