org.eclipse.ocl.examples.domain.utilities
Class StandaloneProjectMap.ProjectDescriptor

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.ProjectDescriptor
All Implemented Interfaces:
StandaloneProjectMap.IProjectDescriptor
Direct Known Subclasses:
ProjectMap.ProjectDescriptor
Enclosing class:
StandaloneProjectMap

public static class StandaloneProjectMap.ProjectDescriptor
extends java.lang.Object
implements StandaloneProjectMap.IProjectDescriptor


Field Summary
protected  org.eclipse.emf.common.util.URI locationURI
          The resolveable location.
protected  java.lang.String name
          The project/bundle/plugin name; e.g.
protected  StandaloneProjectMap projectMap
          The overall ProjectMap
 
Constructor Summary
StandaloneProjectMap.ProjectDescriptor(StandaloneProjectMap projectMap, java.lang.String name, org.eclipse.emf.common.util.URI locationURI)
           
 
Method Summary
 void addPackageDescriptor(StandaloneProjectMap.IPackageDescriptor packageDescriptor)
          Call back to add a packageDescriptor to the project.
 void addResourceDescriptor(StandaloneProjectMap.IResourceDescriptor resourceDescriptor)
          Call back to add a resourceDescriptor to the project.
 void configure(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, StandaloneProjectMap.IResourceLoadStrategy resourceLoadStrategy, StandaloneProjectMap.IConflictHandler conflictHandler)
          Configure the resourceSet-specific status of for this resource to use a strategy and a conflictHandler.
 StandaloneProjectMap.IResourceDescriptor createResourceDescriptor(java.lang.String genModel, java.util.Map<org.eclipse.emf.common.util.URI,java.lang.String> nsURI2className)
          Create an IResourceDescriptor for a projectRelativeGenModelUri comprsising a map of NsURI to className.
 java.io.File getLocationFile(java.lang.String projectRelativeFileName)
          Return the physical location of a projectRelativeFileName as a File.
 org.eclipse.emf.common.util.URI getLocationURI()
          Return the physical location of this project.
 org.eclipse.emf.common.util.URI getLocationURI(java.lang.String projectRelativeFileName)
          Return the physical location of a projectRelativeFileName as a URI.
 java.lang.String getName()
          Return project name.
 StandaloneProjectMap.IPackageDescriptor getPackageDescriptor(org.eclipse.emf.common.util.URI nsURI)
          Return the package descriptor for the package with a given nsURI or null if none known in the project.
 org.eclipse.emf.common.util.URI getPlatformPluginURI()
          Return the location of this project as a platform:/plugin URI.
 org.eclipse.emf.common.util.URI getPlatformPluginURI(java.lang.String projectRelativeFileName)
          Return the location of a projectRelativeFileName as a platform:/resource URI.
 org.eclipse.emf.common.util.URI getPlatformResourceURI()
          Return the location of this project as a platform:/resource URI.
 org.eclipse.emf.common.util.URI getPlatformResourceURI(java.lang.String projectRelativeFileName)
          Return the location of a projectRelativeFileName as a platform:/resource URI.
 StandaloneProjectMap getProjectMap()
          Return the overall ProjectMap.
 java.util.Collection<StandaloneProjectMap.IResourceDescriptor> getResourceDescriptors()
          Return all packages descriptors in the project.
 void initializeGenModelLocationMap(java.util.Map<org.eclipse.emf.common.util.URI,StandaloneProjectMap.IPackageDescriptor> nsURI2package)
           
 void initializePlatformResourceMap()
           
 void initializeURIMap(java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> uriMap)
           
 java.lang.String toString()
           
 void unload(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

projectMap

@NonNull
protected final StandaloneProjectMap projectMap
The overall ProjectMap


name

@NonNull
protected final java.lang.String name
The project/bundle/plugin name; e.g. "org.eclipse.emf.ecore"


locationURI

@NonNull
protected final org.eclipse.emf.common.util.URI locationURI
The resolveable location.

Constructor Detail

StandaloneProjectMap.ProjectDescriptor

public StandaloneProjectMap.ProjectDescriptor(@NonNull
                                              StandaloneProjectMap projectMap,
                                              @NonNull
                                              java.lang.String name,
                                              @NonNull
                                              org.eclipse.emf.common.util.URI locationURI)
Method Detail

addPackageDescriptor

public void addPackageDescriptor(@NonNull
                                 StandaloneProjectMap.IPackageDescriptor packageDescriptor)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Call back to add a packageDescriptor to the project.

Specified by:
addPackageDescriptor in interface StandaloneProjectMap.IProjectDescriptor

addResourceDescriptor

public void addResourceDescriptor(@NonNull
                                  StandaloneProjectMap.IResourceDescriptor resourceDescriptor)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Call back to add a resourceDescriptor to the project.

Specified by:
addResourceDescriptor in interface StandaloneProjectMap.IProjectDescriptor

configure

public void configure(@Nullable
                      org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                      @NonNull
                      StandaloneProjectMap.IResourceLoadStrategy resourceLoadStrategy,
                      @Nullable
                      StandaloneProjectMap.IConflictHandler conflictHandler)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Configure the resourceSet-specific status of for this resource to use a strategy and a conflictHandler.

Specified by:
configure in interface StandaloneProjectMap.IProjectDescriptor

createResourceDescriptor

@NonNull
public StandaloneProjectMap.IResourceDescriptor createResourceDescriptor(@NonNull
                                                                                 java.lang.String genModel,
                                                                                 @NonNull
                                                                                 java.util.Map<org.eclipse.emf.common.util.URI,java.lang.String> nsURI2className)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Create an IResourceDescriptor for a projectRelativeGenModelUri comprsising a map of NsURI to className.

Specified by:
createResourceDescriptor in interface StandaloneProjectMap.IProjectDescriptor

getLocationURI

@NonNull
public org.eclipse.emf.common.util.URI getLocationURI()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the physical location of this project.

Specified by:
getLocationURI in interface StandaloneProjectMap.IProjectDescriptor

getLocationURI

@NonNull
public org.eclipse.emf.common.util.URI getLocationURI(@NonNull
                                                              java.lang.String projectRelativeFileName)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the physical location of a projectRelativeFileName as a URI.

Specified by:
getLocationURI in interface StandaloneProjectMap.IProjectDescriptor

getLocationFile

@NonNull
public java.io.File getLocationFile(@NonNull
                                            java.lang.String projectRelativeFileName)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the physical location of a projectRelativeFileName as a File.

Specified by:
getLocationFile in interface StandaloneProjectMap.IProjectDescriptor

getName

@NonNull
public java.lang.String getName()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return project name.

Specified by:
getName in interface StandaloneProjectMap.IProjectDescriptor

getPackageDescriptor

@Nullable
public StandaloneProjectMap.IPackageDescriptor getPackageDescriptor(@NonNull
                                                                             org.eclipse.emf.common.util.URI nsURI)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the package descriptor for the package with a given nsURI or null if none known in the project.

Specified by:
getPackageDescriptor in interface StandaloneProjectMap.IProjectDescriptor

getResourceDescriptors

@Nullable
public java.util.Collection<StandaloneProjectMap.IResourceDescriptor> getResourceDescriptors()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return all packages descriptors in the project.

Specified by:
getResourceDescriptors in interface StandaloneProjectMap.IProjectDescriptor

getPlatformPluginURI

@NonNull
public org.eclipse.emf.common.util.URI getPlatformPluginURI()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the location of this project as a platform:/plugin URI.

Specified by:
getPlatformPluginURI in interface StandaloneProjectMap.IProjectDescriptor

getPlatformPluginURI

@NonNull
public org.eclipse.emf.common.util.URI getPlatformPluginURI(@NonNull
                                                                    java.lang.String projectRelativeFileName)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the location of a projectRelativeFileName as a platform:/resource URI.

Specified by:
getPlatformPluginURI in interface StandaloneProjectMap.IProjectDescriptor

getPlatformResourceURI

@NonNull
public org.eclipse.emf.common.util.URI getPlatformResourceURI()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the location of this project as a platform:/resource URI.

Specified by:
getPlatformResourceURI in interface StandaloneProjectMap.IProjectDescriptor

getPlatformResourceURI

@NonNull
public org.eclipse.emf.common.util.URI getPlatformResourceURI(@NonNull
                                                                      java.lang.String projectRelativeFileName)
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the location of a projectRelativeFileName as a platform:/resource URI.

Specified by:
getPlatformResourceURI in interface StandaloneProjectMap.IProjectDescriptor

getProjectMap

@NonNull
public StandaloneProjectMap getProjectMap()
Description copied from interface: StandaloneProjectMap.IProjectDescriptor
Return the overall ProjectMap.

Specified by:
getProjectMap in interface StandaloneProjectMap.IProjectDescriptor

initializeGenModelLocationMap

public void initializeGenModelLocationMap(@NonNull
                                          java.util.Map<org.eclipse.emf.common.util.URI,StandaloneProjectMap.IPackageDescriptor> nsURI2package)
Specified by:
initializeGenModelLocationMap in interface StandaloneProjectMap.IProjectDescriptor

initializePlatformResourceMap

public void initializePlatformResourceMap()
Specified by:
initializePlatformResourceMap in interface StandaloneProjectMap.IProjectDescriptor

initializeURIMap

public void initializeURIMap(@NonNull
                             java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> uriMap)
Specified by:
initializeURIMap in interface StandaloneProjectMap.IProjectDescriptor

unload

public void unload(@NonNull
                   org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Specified by:
unload in interface StandaloneProjectMap.IProjectDescriptor

toString

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