|
|
|
|
org.eclipse.emf.query.ocl.conditions
Class OCLConstraintCondition
java.lang.Object
org.eclipse.emf.query.conditions.Condition
org.eclipse.emf.query.conditions.eobjects.EObjectCondition
org.eclipse.emf.query.ocl.conditions.OCLCondition
org.eclipse.emf.query.ocl.conditions.OCLConstraintCondition
Deprecated. Prefer the
BooleanOCLCondition class, which supports
customization of the OCL parsing environment as well as other metamodels
than Ecore
-
@Deprecated
public class OCLConstraintCondition
- extends
OCLCondition
A specialized OCL condition class that is used to apply boolean-valued OCL
expressions to EObject s. These are commonly used to express
invariant constraints; they are not typically
evaluated but are usually checked
for
isSatisfied(EObject) .
Constructor Summary
|
OCLConstraintCondition
(
Query oclQuery,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
Deprecated. Initializes a constraint condition with a compiled OCL query, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree. |
OCLConstraintCondition
(
Query oclQuery,
EClass contextEObjectType,
PruneHandler pruneHandler)
Deprecated.
Initializes a constraint condition with a compiled OCL query, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree. |
OCLConstraintCondition
(
String oclExpressionString,
EClass contextEObjectType)
Deprecated. Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, and an
IEStructuralFeatureValueGetter to use to get values of
StructuralFeature s referenced by the OCL
expression. |
OCLConstraintCondition
(
String oclExpressionString,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter)
Deprecated. Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, and an
IEStructuralFeatureValueGetter to use to get values of
StructuralFeature s referenced by the OCL
expression. |
OCLConstraintCondition
(
String oclExpressionString,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
Deprecated. Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree. |
Method Summary
|
boolean
|
isSatisfied
(
EObject eObject)
Deprecated. Computes the boolean value resulting from evaluating the constraint
condition on the specified eObject . |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
NULL_CONDITION
public static final
OCLConstraintCondition NULL_CONDITION
-
Deprecated.
- A simple condition constant that represents an
OCLConstraintCondition that is always
satisfied. Functions as a literal "true".
OCLConstraintCondition
public OCLConstraintCondition(
String oclExpressionString,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter)
-
Deprecated.
- Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, and an
IEStructuralFeatureValueGetter to use to get values of
StructuralFeature s referenced by the OCL
expression. It defaults to using PruneHandler.NEVER to consult
for pruning.
NOTE: if contextEObjectType is null ,
then this becomes a context-free OCL constraint condition.
-
Parameters:
-
oclExpressionString - The OCL expression to apply when evaluating this
OCLCondition
-
contextEObjectType - The EClass representing the OCL context classifier.
Use null to create a context-free
OCLCondition . -
eStructuralFeatureValueGetter - The strategy for accessing structural feature values. It
serves as a layer of indirection to allow clients to intervene
between this condition object and the way it extracts the
StructuralFeature s' values so
as to allow for manipulation of such values before subjecting
them to evaluation by the OCL interpreter.
OCLConstraintCondition
public OCLConstraintCondition(
String oclExpressionString,
EClass contextEObjectType)
-
Deprecated.
- Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, and an
IEStructuralFeatureValueGetter to use to get values of
StructuralFeature s referenced by the OCL
expression. It defaults to using PruneHandler.NEVER to consult
for pruning.
NOTE: if contextEObjectType is null ,
then this becomes a context-free OCL constraint condition.
This constructor implicitly uses the default
EStructuralFeatureValueGetter
to access any EAttributes or EReferences of EObjects.
-
Parameters:
-
oclExpressionString - The OCL expression to apply when evaluating this
OCLCondition
-
contextEObjectType - The EClass representing the OCL context classifier.
Use null to create a context-free
OCLCondition .
OCLConstraintCondition
public OCLConstraintCondition(
String oclExpressionString,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
-
Deprecated.
- Initializes a constraint condition with an OCL expression string, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree.
NOTE: if contextEObjectType is null ,
then this becomes a context-free OCL constraint condition.
-
Parameters:
-
oclExpressionString - The OCL expression to apply when evaluating this
OCLCondition
-
contextEObjectType - The EClass representing the OCL context classifier.
Use null to create a context-free
OCLCondition . -
eStructuralFeatureValueGetter - The strategy for accessing structural feature values. It
serves as a layer of indirection to allow clients to intervene
between this condition object and the way it extracts the
StructuralFeature s' values so
as to allow for manipulation of such values before subjecting
them to evaluation by the OCL interpreter. -
pruneHandler - The PruneHandler to consult when pruning
OCLConstraintCondition
public OCLConstraintCondition(
Query oclQuery,
EClass contextEObjectType,
IEStructuralFeatureValueGetter eStructuralFeatureValueGetter,
PruneHandler pruneHandler)
-
Deprecated.
- Initializes a constraint condition with a compiled OCL query, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree.
-
Parameters:
-
oclQuery - The OCL query to apply when evaluating this
OCLCondition
-
contextEObjectType - The EClass representing the OCL context classifier.
Must not be null . -
eStructuralFeatureValueGetter - The strategy for accessing structural feature values. It
serves as a layer of indirection to allow clients to intervene
between this condition object and the way it extracts the
StructuralFeature s' values so
as to allow for manipulation of such values before subjecting
them to evaluation by the OCL interpreter. -
pruneHandler - The PruneHandler to consult when pruning
OCLConstraintCondition
public OCLConstraintCondition(
Query oclQuery,
EClass contextEObjectType,
PruneHandler pruneHandler)
-
Deprecated.
-
Initializes a constraint condition with a compiled OCL query, an
EClass representing the EObject type which the OCL
expression uses as a context, an IEStructuralFeatureValueGetter
to use to get values of StructuralFeature s
referenced by the OCL expression, and a PruneHandler to consult
for pruning the content tree.
This constructor implicitly uses the default
EStructuralFeatureValueGetter
to retrieve the values of an EObject's structural feature values.
-
Parameters:
-
oclQuery - The OCL query to apply when evaluating this
OCLCondition
-
contextEObjectType - The EClass representing the OCL context classifier.
Must not be null . -
pruneHandler - The PruneHandler to consult when pruning
isSatisfied
public boolean isSatisfied(
EObject eObject)
-
Deprecated.
- Computes the boolean value resulting from evaluating the constraint
condition on the specified
eObject .
-
-
Overrides:
-
isSatisfied
in class
OCLCondition
-
-
Parameters:
-
eObject - the EObject to check
-
Returns:
- boolean
true if the argument eObject satisfies
this EObjectCondition
-
See Also:
-
OCLCondition.getContextEObjectType() ,
OCLCondition.isContextFree()
|
|
|