org.eclipse.ocl.examples.pivot.delegate
Class OCLDelegateDomain

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.delegate.OCLDelegateDomain
All Implemented Interfaces:
DelegateDomain, MetaModelManagerListener

public class OCLDelegateDomain
extends java.lang.Object
implements DelegateDomain, MetaModelManagerListener

An implementation of a delegate domain for an OCL enhanced package. The domain maintains an OCL facade to be shared by all delegates within the package.


Nested Class Summary
protected static class OCLDelegateDomain.PivotOnlyRegistry
           
protected static class OCLDelegateDomain.PivotOnlyVirtualDelegateMapping
           
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.pivot.delegate.DelegateDomain
DelegateDomain.Factory
 
Field Summary
protected  org.eclipse.emf.ecore.EPackage ePackage
           
protected  OCL ocl
           
static java.lang.String OCL_DELEGATE_URI_PIVOT
          The delegate URI for Ecore annotations using the Pivot evaluator.
protected  java.lang.String uri
           
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.delegate.DelegateDomain
EMPTY_LIST
 
Constructor Summary
OCLDelegateDomain(java.lang.String delegateURI, org.eclipse.emf.ecore.EPackage ePackage)
          Initializes me with my delegate URI and package.
 
Method Summary
 MetaModelManager getMetaModelManager()
           
 OCL getOCL()
           
<T extends Element>
T
getPivot(java.lang.Class<T> requiredClass, org.eclipse.emf.ecore.EObject eObject)
           
 java.lang.String getURI()
          Get the delegate domain name.
static void initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Initialize the resourceSet registries, if non-null, or the global registries, if null, to support usage of the Pivot OCL Delegate Evaluator for the Pivot OCL Delegate URI.
static void initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String oclDelegateURI)
          Initialize the resourceSet registries, if non-null, or the global registries, if null, to support usage of the Pivot OCL Delegate Evaluator for the oclDelegateURI.
static void initializePivotOnlyDiagnosticianContext(java.util.Map<java.lang.Object,java.lang.Object> context)
           
static void initializePivotOnlyDiagnosticianResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 void metaModelManagerDisposed(MetaModelManager metaModelManager)
          Respond to disposal of the MetaModelManager by eliminating all further usage.
 void reset()
          Reset this delegate domain releasing any resources cached to support delegated behaviour for the associated package.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OCL_DELEGATE_URI_PIVOT

@NonNull
public static final java.lang.String OCL_DELEGATE_URI_PIVOT
The delegate URI for Ecore annotations using the Pivot evaluator.

See Also:
Constant Field Values

uri

@NonNull
protected final java.lang.String uri

ePackage

@NonNull
protected final org.eclipse.emf.ecore.EPackage ePackage

ocl

protected OCL ocl
Constructor Detail

OCLDelegateDomain

public OCLDelegateDomain(@NonNull
                         java.lang.String delegateURI,
                         @NonNull
                         org.eclipse.emf.ecore.EPackage ePackage)
Initializes me with my delegate URI and package.

Parameters:
delegateURI - the delegate namespace I handle
ePackage - the package that I handle
Throws:
ParserException - if the operation's OCL body expression is invalid
Method Detail

initialize

public static void initialize(@Nullable
                              org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Initialize the resourceSet registries, if non-null, or the global registries, if null, to support usage of the Pivot OCL Delegate Evaluator for the Pivot OCL Delegate URI.


initialize

public static void initialize(@Nullable
                              org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                              @NonNull
                              java.lang.String oclDelegateURI)
Initialize the resourceSet registries, if non-null, or the global registries, if null, to support usage of the Pivot OCL Delegate Evaluator for the oclDelegateURI.


initializePivotOnlyDiagnosticianContext

public static void initializePivotOnlyDiagnosticianContext(@NonNull
                                                           java.util.Map<java.lang.Object,java.lang.Object> context)

initializePivotOnlyDiagnosticianResourceSet

public static void initializePivotOnlyDiagnosticianResourceSet(@NonNull
                                                               org.eclipse.emf.ecore.resource.ResourceSet resourceSet)

getMetaModelManager

@NonNull
public final MetaModelManager getMetaModelManager()

getOCL

@NonNull
public OCL getOCL()

getPivot

public <T extends Element> T getPivot(@NonNull
                                      java.lang.Class<T> requiredClass,
                                      @NonNull
                                      org.eclipse.emf.ecore.EObject eObject)

getURI

@NonNull
public final java.lang.String getURI()
Description copied from interface: DelegateDomain
Get the delegate domain name.

Specified by:
getURI in interface DelegateDomain
Returns:
the delegate URI

metaModelManagerDisposed

public void metaModelManagerDisposed(@NonNull
                                     MetaModelManager metaModelManager)
Description copied from interface: MetaModelManagerListener
Respond to disposal of the MetaModelManager by eliminating all further usage.

Specified by:
metaModelManagerDisposed in interface MetaModelManagerListener

reset

public void reset()
Description copied from interface: DelegateDomain
Reset this delegate domain releasing any resources cached to support delegated behaviour for the associated package. They can be lazily recreated.

Specified by:
reset in interface DelegateDomain

toString

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