|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.examples.pivot.delegate.OCLDelegateDomain
public class OCLDelegateDomain
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 |
---|
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_LPG
The EAnnotation source URI for delegate OCL annotations. |
static java.lang.String |
OCL_DELEGATE_URI_PIVOT
|
protected TypeManager |
typeManager
|
protected java.lang.String |
uri
|
Constructor Summary | |
---|---|
OCLDelegateDomain(java.lang.String delegateURI,
org.eclipse.emf.ecore.EPackage ePackage)
Initializes me with my delegate URI and package. |
Method Summary | ||
---|---|---|
void |
dispose()
Dispose of this delegate domain releasing any resources cached to support delegated behaviour for the associated package. |
|
static org.eclipse.emf.ecore.EAnnotation |
getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement)
Return the OCL Delegate EAnnotation, which is an EAnnotation with #OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with #OCL_DELEGATE_URI and a / character/ |
|
static java.lang.String |
getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement,
java.lang.String key)
|
|
OCL |
getOCL()
|
|
|
getPivot(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
|
|
TypeManager |
getTypeManager()
|
|
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. |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OCL_DELEGATE_URI_LPG
For an EOperation, the EAnnotation details may include
a body key to provide an OCL expression value that specifies body: of the operation.
a precondition key to provide an OCL expression value that specifies pre: for the operation.
a postcondition key to provide an OCL expression value that specifies post: for the operation.
For an EStructuralFeature, the EAnnotation details may include
a derivation key to provide an OCL expression value that specifies derive: for the property.
a initial key to provide an OCL expression value that specifies initial: for the operation.
For an EClassifier (EClass, EDataType), the EAnnotation details may include
a constraintName key to provide an OCL expression value that specifies inv constraintName: for the classifier.
Note that the delegate OCL functionality must be enabled by an EPackage Ecore annotation specifying this URI as the value of invocationDelegates, settingDelegates and validationDelegates details keys.
Note also that validation must be enabled by specifying an EClassifier Ecore annotation with a space separated list of invariant constraintNames as the value of the constraints details key.
See /org.eclipse.ocl.ecore.tests/model/Company.ecore or http://wiki.eclipse.org/MDT/OCLinEcore for an example.
public static final java.lang.String OCL_DELEGATE_URI_PIVOT
protected final java.lang.String uri
protected final org.eclipse.emf.ecore.EPackage ePackage
protected final OCL ocl
protected final TypeManager typeManager
Constructor Detail |
---|
public OCLDelegateDomain(java.lang.String delegateURI, org.eclipse.emf.ecore.EPackage ePackage)
delegateURI
- the delegate namespace I handleePackage
- the package that I handle
ParserException
- if the operation's OCL body expression is invalidMethod Detail |
---|
public static org.eclipse.emf.ecore.EAnnotation getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement)
#OCL_DELEGATE_URI
as its source, or if no such EAnnotation is present, then the first EAnnotation with a source
whose URI starts with #OCL_DELEGATE_URI
and a / character/
public static java.lang.String getDelegateAnnotation(org.eclipse.emf.ecore.EModelElement eModelElement, java.lang.String key)
public static void initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
public static void initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String oclDelegateURI)
public void dispose()
DelegateDomain
dispose
in interface DelegateDomain
public OCL getOCL()
public <T extends Element> T getPivot(java.lang.Class<T> requiredClass, org.eclipse.emf.ecore.EObject eObject)
public TypeManager getTypeManager()
public java.lang.String getURI()
DelegateDomain
getURI
in interface DelegateDomain
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |