org.eclipse.ocl.examples.modelregistry.eclipse
Class EclipseProjectHandle

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

public class EclipseProjectHandle
extends EclipseFileHandle
implements ProjectHandle


Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.modelregistry.eclipse.EclipseFileHandle
projectHandle, resource
 
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
EclipseProjectHandle(org.eclipse.core.resources.IProject project)
           
 
Method Summary
 EclipseFileHandle getFileHandle(org.eclipse.core.resources.IResource resource)
           
 EclipseFileHandle 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.
 org.eclipse.core.resources.IProject getProjectResource()
           
 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.core.resources.IFile getRegistryResource()
           
 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.
 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)
           
 
Methods inherited from class org.eclipse.ocl.examples.modelregistry.eclipse.EclipseFileHandle
exists, getAbsoluteName, getContents, getName, getParentFileHandle, getProjectHandle, getProjectRelativeName, getProjectRelativePath, getResource, 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, getParentFileHandle, getProjectHandle, getProjectRelativeName, isFile, isFolder, isProject
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

EclipseProjectHandle

public EclipseProjectHandle(org.eclipse.core.resources.IProject project)
Method Detail

getFileHandle

public EclipseFileHandle getFileHandle(java.lang.String name)
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

getFileHandle

public EclipseFileHandle getFileHandle(org.eclipse.core.resources.IResource resource)

getProjectResource

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

getRegistryResource

public org.eclipse.core.resources.IFile getRegistryResource()

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

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()

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 EclipseFileHandle
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)