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

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.PackageLoadStatus
All Implemented Interfaces:
StandaloneProjectMap.IPackageLoadStatus
Enclosing class:
StandaloneProjectMap

public static final class StandaloneProjectMap.PackageLoadStatus
extends java.lang.Object
implements StandaloneProjectMap.IPackageLoadStatus


Field Summary
protected  StandaloneProjectMap.EPackageDescriptor namespaceURIDescriptor
           
protected  StandaloneProjectMap.IPackageDescriptor packageDescriptor
           
protected  StandaloneProjectMap.AbstractResourceLoadStatus resourceLoadStatus
           
 
Constructor Summary
StandaloneProjectMap.PackageLoadStatus(StandaloneProjectMap.AbstractResourceLoadStatus resourceLoadStatus, StandaloneProjectMap.IPackageDescriptor packageDescriptor)
           
 
Method Summary
 void configureEPackageRegistry(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Configure the resourceSet EPackage.Registry for this package to resolve to the defined generated/loaded EPackage.
 void dispose()
          Dispose of all facilities used by the PackageLoadStatus, and remove all EPackageDescriptor entries.
 org.eclipse.emf.ecore.EPackage getConflictingGeneratedPackage()
          Return the EPackage to be used for a namespace URI after a platform-resource/plugin URI has already been loaded.
 org.eclipse.emf.ecore.EPackage getEPackage()
          Return the generated EPackage instance, or null if none loaded.
 org.eclipse.emf.ecore.EPackage getEPackageInstance()
          Return the generated EPackage instance without affecting the prevailing status.
 org.eclipse.emf.ecore.EPackage getFirstEPackage()
          Return the EPackage resolved by the first loadEPackageByModelURI/loadEPackageByNsURI, or null if none loaded.
 org.eclipse.emf.ecore.EPackage getModel()
          Return the loaded EPackages, or null if none loaded.
 StandaloneProjectMap.IPackageDescriptor getPackageDescriptor()
          Return the descriptor for the package.
 StandaloneProjectMap.IResourceLoadStatus getResourceLoadStatus()
          Get the status of the resource containing this package.
 StandaloneProjectMap.IResourceLoadStrategy getResourceLoadStrategy()
           
 org.eclipse.emf.ecore.EPackage loadEPackage()
          Load and return the generated EPackage instance appropriate to the namespace URI.
 void setEPackage(org.eclipse.emf.ecore.EPackage ePackage)
          Define the generated EPackage for this package.
 void setModel(org.eclipse.emf.ecore.EPackage ePackage)
          Define the loaded EPackage for this package.
 java.lang.String toString()
           
 void unloadedResource()
          Reset the status following notiofication that the model has been unloaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resourceLoadStatus

@NonNull
protected final StandaloneProjectMap.AbstractResourceLoadStatus resourceLoadStatus

packageDescriptor

@NonNull
protected final StandaloneProjectMap.IPackageDescriptor packageDescriptor

namespaceURIDescriptor

@NonNull
protected final StandaloneProjectMap.EPackageDescriptor namespaceURIDescriptor
Constructor Detail

StandaloneProjectMap.PackageLoadStatus

public StandaloneProjectMap.PackageLoadStatus(@NonNull
                                              StandaloneProjectMap.AbstractResourceLoadStatus resourceLoadStatus,
                                              @NonNull
                                              StandaloneProjectMap.IPackageDescriptor packageDescriptor)
Method Detail

configureEPackageRegistry

public void configureEPackageRegistry(@NonNull
                                      org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Configure the resourceSet EPackage.Registry for this package to resolve to the defined generated/loaded EPackage.

Specified by:
configureEPackageRegistry in interface StandaloneProjectMap.IPackageLoadStatus

dispose

public void dispose()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Dispose of all facilities used by the PackageLoadStatus, and remove all EPackageDescriptor entries.

Specified by:
dispose in interface StandaloneProjectMap.IPackageLoadStatus

getConflictingGeneratedPackage

@Nullable
public org.eclipse.emf.ecore.EPackage getConflictingGeneratedPackage()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the EPackage to be used for a namespace URI after a platform-resource/plugin URI has already been loaded.

Specified by:
getConflictingGeneratedPackage in interface StandaloneProjectMap.IPackageLoadStatus

getEPackage

@Nullable
public org.eclipse.emf.ecore.EPackage getEPackage()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the generated EPackage instance, or null if none loaded.

Specified by:
getEPackage in interface StandaloneProjectMap.IPackageLoadStatus

getEPackageInstance

@Nullable
public org.eclipse.emf.ecore.EPackage getEPackageInstance()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the generated EPackage instance without affecting the prevailing status. Returns null if an instance cannot be loaded.

Specified by:
getEPackageInstance in interface StandaloneProjectMap.IPackageLoadStatus

getFirstEPackage

@Nullable
public org.eclipse.emf.ecore.EPackage getFirstEPackage()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the EPackage resolved by the first loadEPackageByModelURI/loadEPackageByNsURI, or null if none loaded.

Specified by:
getFirstEPackage in interface StandaloneProjectMap.IPackageLoadStatus

getModel

@Nullable
public org.eclipse.emf.ecore.EPackage getModel()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the loaded EPackages, or null if none loaded.

Specified by:
getModel in interface StandaloneProjectMap.IPackageLoadStatus

getPackageDescriptor

@NonNull
public StandaloneProjectMap.IPackageDescriptor getPackageDescriptor()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Return the descriptor for the package.

Specified by:
getPackageDescriptor in interface StandaloneProjectMap.IPackageLoadStatus

getResourceLoadStrategy

@NonNull
public StandaloneProjectMap.IResourceLoadStrategy getResourceLoadStrategy()

getResourceLoadStatus

@NonNull
public StandaloneProjectMap.IResourceLoadStatus getResourceLoadStatus()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Get the status of the resource containing this package.

Specified by:
getResourceLoadStatus in interface StandaloneProjectMap.IPackageLoadStatus

loadEPackage

@Nullable
public org.eclipse.emf.ecore.EPackage loadEPackage()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Load and return the generated EPackage instance appropriate to the namespace URI.

Specified by:
loadEPackage in interface StandaloneProjectMap.IPackageLoadStatus

setEPackage

public void setEPackage(@NonNull
                        org.eclipse.emf.ecore.EPackage ePackage)
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Define the generated EPackage for this package.

Specified by:
setEPackage in interface StandaloneProjectMap.IPackageLoadStatus

setModel

public void setModel(@NonNull
                     org.eclipse.emf.ecore.EPackage ePackage)
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Define the loaded EPackage for this package.

Specified by:
setModel in interface StandaloneProjectMap.IPackageLoadStatus

toString

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

unloadedResource

public void unloadedResource()
Description copied from interface: StandaloneProjectMap.IPackageLoadStatus
Reset the status following notiofication that the model has been unloaded.

Specified by:
unloadedResource in interface StandaloneProjectMap.IPackageLoadStatus