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

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.delegate.DelegateInstaller

public class DelegateInstaller
extends java.lang.Object


Field Summary
protected  java.lang.String exportDelegateURI
           
protected  MetaModelManager metaModelManager
           
static java.lang.String OPTION_BOOLEAN_INVARIANTS
          True to apply result = () wrapper to invariant body.
static java.lang.String OPTION_OMIT_SETTING_DELEGATES
          True to omit the setting delegates declaration.
protected  java.util.Map<java.lang.String,java.lang.Object> options
           
 
Constructor Summary
DelegateInstaller(MetaModelManager metaModelManager, java.util.Map<java.lang.String,java.lang.Object> options)
           
 
Method Summary
protected  org.eclipse.emf.ecore.EAnnotation createAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement)
           
 org.eclipse.emf.ecore.EAnnotation createConstraintDelegate(org.eclipse.emf.ecore.EModelElement eModelElement, Constraint pivotConstraint, org.eclipse.emf.common.util.URI ecoreURI)
           
protected  java.lang.String createExpression(OCLExpression bodyExpression, org.eclipse.emf.common.util.URI ecoreURI)
           
protected  java.lang.String createExpression(OpaqueExpression bodyExpression, org.eclipse.emf.common.util.URI ecoreURI)
           
 org.eclipse.emf.ecore.EAnnotation createOperationDelegate(org.eclipse.emf.ecore.EOperation eOperation, OpaqueExpression bodyExpression, org.eclipse.emf.common.util.URI ecoreURI)
           
 org.eclipse.emf.ecore.EAnnotation createPropertyDelegate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, OpaqueExpression defaultExpression, org.eclipse.emf.common.util.URI ecoreURI)
           
static java.lang.String getAnnotationKey(Constraint pivotConstraint)
           
static java.lang.String getDelegateURI(org.eclipse.emf.ecore.EPackage ePackage)
           
static java.lang.String getDelegateURI(java.util.List<org.eclipse.emf.ecore.EObject> contents)
           
 java.lang.String getExportDelegateURI()
           
static java.lang.String getExportDelegateURI(java.util.Map<java.lang.String,java.lang.Object> options)
           
 MetaModelManager getMetaModelManager()
           
 boolean installDelegate(org.eclipse.emf.ecore.EModelElement eModelElement, Constraint pivotConstraint, org.eclipse.emf.common.util.URI ecoreURI)
          Deprecated. 
 void installDelegate(org.eclipse.emf.ecore.EOperation eOperation)
           
 void installDelegate(org.eclipse.emf.ecore.EStructuralFeature eFeature)
           
 void installDelegates(org.eclipse.emf.ecore.EClassifier eClassifier, Type pivotType)
           
 void installDelegates(org.eclipse.emf.ecore.EPackage ePackage)
           
 void installDelegates(PackageServer packageServer)
          Install all Constraints from pivotPackage and its nestedPackages as OCL Delegates.
 boolean installOperationDelegate(org.eclipse.emf.ecore.EOperation eOperation, OpaqueExpression bodyExpression, org.eclipse.emf.common.util.URI ecoreURI)
          Deprecated. 
 boolean installPropertyDelegate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, OpaqueExpression defaultExpression, org.eclipse.emf.common.util.URI ecoreURI)
          Deprecated. 
static boolean isBooleanInvariants(java.util.Map<java.lang.String,java.lang.Object> options)
           
static boolean needsDelegates(org.eclipse.emf.ecore.EPackage ePackage)
           
protected  org.eclipse.emf.ecore.EAnnotation removeDelegateAnnotations(org.eclipse.emf.ecore.EModelElement eModelElement, java.lang.String exportDelegateURI)
          Remove all OCL Delegate annotations except that corresponding to exportDelegateURI which is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_BOOLEAN_INVARIANTS

@NonNull
public static final java.lang.String OPTION_BOOLEAN_INVARIANTS
True to apply result = () wrapper to invariant body.

See Also:
Constant Field Values

OPTION_OMIT_SETTING_DELEGATES

@NonNull
public static final java.lang.String OPTION_OMIT_SETTING_DELEGATES
True to omit the setting delegates declaration. Useful for matching UML2Ecore behaviour.

See Also:
Constant Field Values

metaModelManager

@NonNull
protected final MetaModelManager metaModelManager

options

@NonNull
protected final java.util.Map<java.lang.String,java.lang.Object> options

exportDelegateURI

@Nullable
protected final java.lang.String exportDelegateURI
Constructor Detail

DelegateInstaller

public DelegateInstaller(@NonNull
                         MetaModelManager metaModelManager,
                         @Nullable
                         java.util.Map<java.lang.String,java.lang.Object> options)
Method Detail

getAnnotationKey

@Nullable
public static java.lang.String getAnnotationKey(@NonNull
                                                         Constraint pivotConstraint)

getDelegateURI

@Nullable
public static java.lang.String getDelegateURI(@NonNull
                                                       java.util.List<org.eclipse.emf.ecore.EObject> contents)

getDelegateURI

@Nullable
public static java.lang.String getDelegateURI(@NonNull
                                                       org.eclipse.emf.ecore.EPackage ePackage)

getExportDelegateURI

@Nullable
public static java.lang.String getExportDelegateURI(@NonNull
                                                             java.util.Map<java.lang.String,java.lang.Object> options)

isBooleanInvariants

public static boolean isBooleanInvariants(@NonNull
                                          java.util.Map<java.lang.String,java.lang.Object> options)

needsDelegates

public static boolean needsDelegates(@NonNull
                                     org.eclipse.emf.ecore.EPackage ePackage)

createAnnotation

@NonNull
protected org.eclipse.emf.ecore.EAnnotation createAnnotation(@NonNull
                                                                     org.eclipse.emf.ecore.EModelElement eModelElement)

createConstraintDelegate

@Nullable
public org.eclipse.emf.ecore.EAnnotation createConstraintDelegate(@NonNull
                                                                           org.eclipse.emf.ecore.EModelElement eModelElement,
                                                                           @NonNull
                                                                           Constraint pivotConstraint,
                                                                           @Nullable
                                                                           org.eclipse.emf.common.util.URI ecoreURI)

createExpression

@Nullable
protected java.lang.String createExpression(@NonNull
                                                     OpaqueExpression bodyExpression,
                                                     @Nullable
                                                     org.eclipse.emf.common.util.URI ecoreURI)

createExpression

@Nullable
protected java.lang.String createExpression(@NonNull
                                                     OCLExpression bodyExpression,
                                                     @Nullable
                                                     org.eclipse.emf.common.util.URI ecoreURI)

createOperationDelegate

@Nullable
public org.eclipse.emf.ecore.EAnnotation createOperationDelegate(@NonNull
                                                                          org.eclipse.emf.ecore.EOperation eOperation,
                                                                          @NonNull
                                                                          OpaqueExpression bodyExpression,
                                                                          @Nullable
                                                                          org.eclipse.emf.common.util.URI ecoreURI)

createPropertyDelegate

@Nullable
public org.eclipse.emf.ecore.EAnnotation createPropertyDelegate(@NonNull
                                                                         org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
                                                                         @NonNull
                                                                         OpaqueExpression defaultExpression,
                                                                         @Nullable
                                                                         org.eclipse.emf.common.util.URI ecoreURI)

getExportDelegateURI

@Nullable
public java.lang.String getExportDelegateURI()

getMetaModelManager

@NonNull
public MetaModelManager getMetaModelManager()

installDelegates

public void installDelegates(@NonNull
                             PackageServer packageServer)
Install all Constraints from pivotPackage and its nestedPackages as OCL Delegates.


installDelegate

@Deprecated
public boolean installDelegate(@NonNull
                                          org.eclipse.emf.ecore.EModelElement eModelElement,
                                          @NonNull
                                          Constraint pivotConstraint,
                                          @Nullable
                                          org.eclipse.emf.common.util.URI ecoreURI)
Deprecated. 


installDelegate

public void installDelegate(@NonNull
                            org.eclipse.emf.ecore.EOperation eOperation)

installDelegate

public void installDelegate(@NonNull
                            org.eclipse.emf.ecore.EStructuralFeature eFeature)

installDelegates

public void installDelegates(@NonNull
                             org.eclipse.emf.ecore.EClassifier eClassifier,
                             @NonNull
                             Type pivotType)

installDelegates

public void installDelegates(@NonNull
                             org.eclipse.emf.ecore.EPackage ePackage)

installOperationDelegate

@Deprecated
public boolean installOperationDelegate(@NonNull
                                                   org.eclipse.emf.ecore.EOperation eOperation,
                                                   @NonNull
                                                   OpaqueExpression bodyExpression,
                                                   @Nullable
                                                   org.eclipse.emf.common.util.URI ecoreURI)
Deprecated. 


installPropertyDelegate

@Deprecated
public boolean installPropertyDelegate(@NonNull
                                                  org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
                                                  @NonNull
                                                  OpaqueExpression defaultExpression,
                                                  @Nullable
                                                  org.eclipse.emf.common.util.URI ecoreURI)
Deprecated. 


removeDelegateAnnotations

@Nullable
protected org.eclipse.emf.ecore.EAnnotation removeDelegateAnnotations(@NonNull
                                                                               org.eclipse.emf.ecore.EModelElement eModelElement,
                                                                               @Nullable
                                                                               java.lang.String exportDelegateURI)
Remove all OCL Delegate annotations except that corresponding to exportDelegateURI which is returned.