org.eclipse.ocl.examples.modelregistry.standalone
Class JavaProjectHandle

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.ocl.examples.modelregistry.standalone.JavaFileHandle
          extended by org.eclipse.ocl.examples.modelregistry.standalone.JavaProjectHandle
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, FileHandle, ProjectHandle

public class JavaProjectHandle
extends JavaFileHandle
implements ProjectHandle


Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.modelregistry.standalone.JavaFileHandle
file, projectHandle
 
Fields inherited from interface org.eclipse.ocl.examples.modelregistry.environment.ProjectHandle
DEFAULT_MODEL_REGISTRY_NAME, DEFAULT_MODEL_REGISTRY_NAME2, DEFAULT_MODEL_REGISTRY_PATH, DEFAULT_MODEL_REGISTRY_PATH2
 
Constructor Summary
JavaProjectHandle(java.io.File projectFile, java.lang.String registryPath)
           
JavaProjectHandle(java.lang.String projectFile, java.lang.String registryPath)
           
 
Method Summary
 JavaFileHandle getFileHandle(java.io.File file)
           
 JavaFileHandle 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.
 JavaFileHandle 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.
 java.util.List<java.lang.String> getRegistryNames()
           
 org.eclipse.emf.common.util.URI getRegistryURI()
          Get the preferred URI of the registry model.
 java.util.List<org.eclipse.emf.common.util.URI> getRegistryURIs()
          Get all possible URIs 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 setRegistryNames(java.util.List<java.lang.String> names)
           
 void setRoot(java.lang.String rootPath)
           
 
Methods inherited from class org.eclipse.ocl.examples.modelregistry.standalone.JavaFileHandle
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.modelregistry.environment.FileHandle
exists, getAbsoluteName, getContents, getName, getProjectHandle, getProjectRelativeName, isFile, isFolder, isProject
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

JavaProjectHandle

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

JavaProjectHandle

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

getFileHandle

public JavaFileHandle getFileHandle(java.lang.String name)
                             throws java.io.IOException
Description copied from interface: ProjectHandle
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 ProjectHandle
Returns:
the Handle
Throws:
java.io.IOException

getFileHandle

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

getParentFileHandle

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

Specified by:
getParentFileHandle in interface FileHandle
Overrides:
getParentFileHandle in class JavaFileHandle
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: ProjectHandle
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 ProjectHandle
Returns:
registry name

getRegistryNames

public java.util.List<java.lang.String> getRegistryNames()

getRegistryURI

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

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

getRegistryURIs

public java.util.List<org.eclipse.emf.common.util.URI> getRegistryURIs()
Description copied from interface: ProjectHandle
Get all possible URIs of the registry model.

Specified by:
getRegistryURIs in interface ProjectHandle
Returns:
the registry URIs

getRoot

public java.lang.String getRoot()

getURI

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

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

refreshRegistry

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

Specified by:
refreshRegistry in interface ProjectHandle

setRegistryName

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

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

setRegistryNames

public void setRegistryNames(java.util.List<java.lang.String> names)

setRoot

public void setRoot(java.lang.String rootPath)