org.eclipse.gmt.umlx.registry.standalone
Class ProjectHandle

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.gmt.umlx.registry.standalone.FileHandle
          extended by org.eclipse.gmt.umlx.registry.standalone.ProjectHandle
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, AbstractFileHandle, AbstractProjectHandle

public class ProjectHandle
extends FileHandle
implements AbstractProjectHandle


Field Summary
 
Fields inherited from interface org.eclipse.gmt.umlx.registry.environment.AbstractProjectHandle
DEFAULT_MODEL_REGISTRY_NAME
 
Constructor Summary
ProjectHandle(java.io.File projectFile, java.lang.String registryPath)
           
ProjectHandle(java.lang.String projectFile, java.lang.String registryPath)
           
 
Method Summary
 FileHandle getFileHandle(java.io.File file)
           
 FileHandle getFileHandle(java.lang.String name)
          Return the FileHandle for the model located at name relative to the project, if the name does not start with a /, or with respect to the root if it does.
 FileHandle getParentFileHandle()
          Return the handle of the parent of this handle.
 java.io.File getRegistryFile()
           
 java.lang.String getRegistryName()
          Get the name of the registry model with respect to the project.
 org.eclipse.emf.common.util.URI getRegistryURI()
          Get the URI of the registry model.
 java.lang.String getRoot()
           
 org.eclipse.emf.common.util.URI getURI()
          Get the URI of the file.
 void refreshRegistry()
          Respond to a notification that the registry has changed.
 void setRegistryName(java.lang.String name)
          Define the name of the registry model with respect to the project.
 void setRoot(java.lang.String rootPath)
           
 
Methods inherited from class org.eclipse.gmt.umlx.registry.standalone.FileHandle
createCanonicalFileName, exists, getAbsoluteName, getContents, getFile, getName, getProjectHandle, getProjectRelativeName, getProjectRelativePath, isFile, isFolder, isProject, toString
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.registry.environment.AbstractFileHandle
exists, getAbsoluteName, getContents, getName, getProjectHandle, getProjectRelativeName, isFile, isFolder, isProject
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

ProjectHandle

public ProjectHandle(java.lang.String projectFile,
                     java.lang.String registryPath)
              throws java.io.IOException
Throws:
java.io.IOException

ProjectHandle

public ProjectHandle(java.io.File projectFile,
                     java.lang.String registryPath)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getFileHandle

public FileHandle getFileHandle(java.lang.String name)
                         throws java.io.IOException
Description copied from interface: AbstractProjectHandle
Return the FileHandle for the model located at name relative to the project, if the name does not start with a /, or with respect to the root if it does.

Specified by:
getFileHandle in interface AbstractProjectHandle
Returns:
the Handle
Throws:
java.io.IOException

getFileHandle

public FileHandle getFileHandle(java.io.File file)
                         throws java.io.IOException
Throws:
java.io.IOException

getParentFileHandle

public FileHandle getParentFileHandle()
Description copied from interface: AbstractFileHandle
Return the handle of the parent of this handle.

Specified by:
getParentFileHandle in interface AbstractFileHandle
Overrides:
getParentFileHandle in class FileHandle
Returns:
the parent handle, null for the parent of the project.

getRegistryFile

public java.io.File getRegistryFile()

getRegistryName

public java.lang.String getRegistryName()
Description copied from interface: AbstractProjectHandle
Get the name of the registry model with respect to the project. The default value is DEFAULT_MODEL_REGISTRY_NAME.

Specified by:
getRegistryName in interface AbstractProjectHandle
Returns:
registry name

getRegistryURI

public org.eclipse.emf.common.util.URI getRegistryURI()
Description copied from interface: AbstractProjectHandle
Get the URI of the registry model.

Specified by:
getRegistryURI in interface AbstractProjectHandle
Returns:
the registry URI

getRoot

public java.lang.String getRoot()

getURI

public org.eclipse.emf.common.util.URI getURI()
Description copied from interface: AbstractFileHandle
Get the URI of the file.

Specified by:
getURI in interface AbstractFileHandle
Overrides:
getURI in class FileHandle
Returns:
the file URI

refreshRegistry

public void refreshRegistry()
Description copied from interface: AbstractProjectHandle
Respond to a notification that the registry has changed.

Specified by:
refreshRegistry in interface AbstractProjectHandle

setRegistryName

public void setRegistryName(java.lang.String name)
Description copied from interface: AbstractProjectHandle
Define the name of the registry model with respect to the project.

Specified by:
setRegistryName in interface AbstractProjectHandle
Parameters:
name - registry name

setRoot

public void setRoot(java.lang.String rootPath)