|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.AbstractResourceDescriptor
public abstract static class StandaloneProjectMap.AbstractResourceDescriptor
PackageDescriptor supports lazy class loading and initialization of a compiled Ecore package. Class loading occurs in the context of the ProjectMap, which performs classpath scans, so it is assumed that everything is visible. Re-use in a larger context may require a new ProjectMap to be created. If a PackageDescriptor is installed under multiple URIs, the resource created by the first load is shared by all subsequent resolutions. If a PackageDescriptor is set to useModel, the *.ecore file is loaded to provide the EPackage, rather than the Java className. A PackageDescriptor maintains the declared context of a package which may be shared by many ResourceSets. In contrast a PackageStatus maintains the actual state of a package for a particular EPackage.Registry, each of which may have a distinct ResourceLoadStrategy and consequently may not load the same EPackage.
Field Summary | |
---|---|
protected org.eclipse.emf.common.util.URI |
genModelURI
The project-relative URI of the GenModel for the EPackage (e.g. |
protected java.util.List<StandaloneProjectMap.IPackageDescriptor> |
packageDescriptors
The package descriptors for each of the multiple packages in the genmodel. |
protected StandaloneProjectMap.IProjectDescriptor |
projectDescriptor
The bundle/project in which this package is defined (e.g. |
Constructor Summary | |
---|---|
protected |
StandaloneProjectMap.AbstractResourceDescriptor(StandaloneProjectMap.IProjectDescriptor projectDescriptor,
org.eclipse.emf.common.util.URI genModelURI,
java.util.Map<org.eclipse.emf.common.util.URI,java.lang.String> nsURI2className)
|
Method Summary | |
---|---|
void |
addedDynamicResource(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.ecore.resource.Resource resource)
|
void |
addedGeneratedPackage(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.ecore.EPackage ePackage)
|
void |
configure(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
StandaloneProjectMap.IResourceLoadStrategy resourceLoadStrategy,
StandaloneProjectMap.IConflictHandler conflictHandler)
|
void |
configureResourceSetURIResourceMap(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.ecore.resource.Resource resource)
|
protected abstract StandaloneProjectMap.IResourceLoadStatus |
createResourceLoadStatus(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
|
org.eclipse.emf.common.util.URI |
getGenModelURI()
Return the project relative Gen Model URI. |
org.eclipse.emf.common.util.URI |
getLocationURI()
Return the external filespace form of the model URI containing the package. |
java.util.List<? extends StandaloneProjectMap.IPackageDescriptor> |
getPackageDescriptors()
Return the descriptors for allpackages in this resource. |
org.eclipse.emf.common.util.URI |
getPlatformPluginURI()
Return the platform:/plugin form of the model URI containing the package |
org.eclipse.emf.common.util.URI |
getPlatformResourceURI()
Return the platform:/resource form of the model URI containing the package |
StandaloneProjectMap.IProjectDescriptor |
getProjectDescriptor()
Return the Project Descriptor containing this resource. |
org.eclipse.emf.common.util.URI |
getProjectRelativeEcorePackageURI(org.eclipse.emf.common.util.URI genModelRelativeEcorePackageURI)
|
StandaloneProjectMap.IResourceLoadStatus |
getResourceLoadStatus(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Return IResourceLoadStatus for this resource in conjunction with resourceSet. |
boolean |
hasEcoreModel()
Return true if setEcoreModel has defined the Ecore Model context. |
void |
setEcoreModel(java.util.List<java.lang.String> genModelRelativeEcorePackageUris,
java.util.Map<java.lang.String,StandaloneProjectMap.IPackageDescriptor> nsURI2packageDescriptor)
Set the Ecore Model context of the resource from a list of URIs of the Ecore Packages relative to the genModelURI, and a map of the package namespace URI to package descriptor. |
void |
unload(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Unload the package registry to force a reload. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NonNull protected final StandaloneProjectMap.IProjectDescriptor projectDescriptor
@NonNull protected final org.eclipse.emf.common.util.URI genModelURI
@NonNull protected final java.util.List<StandaloneProjectMap.IPackageDescriptor> packageDescriptors
Constructor Detail |
---|
protected StandaloneProjectMap.AbstractResourceDescriptor(@NonNull StandaloneProjectMap.IProjectDescriptor projectDescriptor, @NonNull org.eclipse.emf.common.util.URI genModelURI, @NonNull java.util.Map<org.eclipse.emf.common.util.URI,java.lang.String> nsURI2className)
Method Detail |
---|
public void addedDynamicResource(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet, @NonNull org.eclipse.emf.ecore.resource.Resource resource)
addedDynamicResource
in interface StandaloneProjectMap.IResourceDescriptor
public void addedGeneratedPackage(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet, @NonNull org.eclipse.emf.ecore.EPackage ePackage)
addedGeneratedPackage
in interface StandaloneProjectMap.IResourceDescriptor
public void configure(@Nullable org.eclipse.emf.ecore.resource.ResourceSet resourceSet, @NonNull StandaloneProjectMap.IResourceLoadStrategy resourceLoadStrategy, @Nullable StandaloneProjectMap.IConflictHandler conflictHandler)
configure
in interface StandaloneProjectMap.IResourceDescriptor
public void configureResourceSetURIResourceMap(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet, @NonNull org.eclipse.emf.ecore.resource.Resource resource)
configureResourceSetURIResourceMap
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull protected abstract StandaloneProjectMap.IResourceLoadStatus createResourceLoadStatus(@Nullable org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
@NonNull public org.eclipse.emf.common.util.URI getGenModelURI()
StandaloneProjectMap.IResourceDescriptor
getGenModelURI
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public org.eclipse.emf.common.util.URI getLocationURI()
StandaloneProjectMap.IResourceDescriptor
getLocationURI
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public java.util.List<? extends StandaloneProjectMap.IPackageDescriptor> getPackageDescriptors()
StandaloneProjectMap.IResourceDescriptor
getPackageDescriptors
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public org.eclipse.emf.common.util.URI getPlatformPluginURI()
StandaloneProjectMap.IResourceDescriptor
getPlatformPluginURI
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public org.eclipse.emf.common.util.URI getPlatformResourceURI()
StandaloneProjectMap.IResourceDescriptor
getPlatformResourceURI
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public StandaloneProjectMap.IProjectDescriptor getProjectDescriptor()
StandaloneProjectMap.IResourceDescriptor
getProjectDescriptor
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public org.eclipse.emf.common.util.URI getProjectRelativeEcorePackageURI(@NonNull org.eclipse.emf.common.util.URI genModelRelativeEcorePackageURI)
getProjectRelativeEcorePackageURI
in interface StandaloneProjectMap.IResourceDescriptor
@NonNull public StandaloneProjectMap.IResourceLoadStatus getResourceLoadStatus(@Nullable org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
StandaloneProjectMap.IResourceDescriptor
getResourceLoadStatus
in interface StandaloneProjectMap.IResourceDescriptor
public boolean hasEcoreModel()
StandaloneProjectMap.IResourceDescriptor
hasEcoreModel
in interface StandaloneProjectMap.IResourceDescriptor
public void setEcoreModel(@NonNull java.util.List<java.lang.String> genModelRelativeEcorePackageUris, @NonNull java.util.Map<java.lang.String,StandaloneProjectMap.IPackageDescriptor> nsURI2packageDescriptor)
StandaloneProjectMap.IResourceDescriptor
setEcoreModel
in interface StandaloneProjectMap.IResourceDescriptor
public void unload(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
StandaloneProjectMap.IResourceDescriptor
unload
in interface StandaloneProjectMap.IResourceDescriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |