|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An OCL constraint or query. The query is validated for correctness when it is created. The query can subsequently be evaluated on a single object or on multiple objects in one operation.
Field Summary | |
---|---|
static java.lang.String |
copyright
|
Method Summary | |
---|---|
boolean |
check(java.util.List objects)
Determines whether all of the input objects satisfy the query. |
boolean |
check(java.lang.Object obj)
Evaluates the query on an object. |
java.lang.Object |
evaluate()
Evaluates the query. |
java.util.List |
evaluate(java.util.List objects)
Evaluates the query on the input list. |
java.lang.Object |
evaluate(java.lang.Object obj)
Evaluates the query on the object. |
EvaluationEnvironment |
getEvaluationEnvironment()
Obtains the evaluation environment that I use to evaluate OCL expressions. |
OCLExpression |
getExpression()
Returns the value of the 'Expression' reference |
java.util.Map |
getExtentMap()
Obtains the mapping of EClassifier s representing OCL types to
their extents (set of all instances). |
java.lang.String |
queryText()
Translates the query back to an OCL text string. |
java.util.List |
reject(java.util.List objects)
Determines the subset of input objects that do not satisfy the query. |
org.eclipse.emf.ecore.EClassifier |
resultType()
Obtains the OCL result type of the query. |
java.util.List |
select(java.util.List objects)
Determines the subset of input objects that satisfy the query. |
void |
setEvaluationEnvironment(EvaluationEnvironment env)
Sets the evaluation environment that I use to evaluate OCL expressions. |
void |
setExtentMap(java.util.Map extentMap)
Sets the mapping of EClassifier s representing OCL types to
their extents (set of all instances). |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
public static final java.lang.String copyright
Method Detail |
public void setEvaluationEnvironment(EvaluationEnvironment env)
env
- my environmentpublic EvaluationEnvironment getEvaluationEnvironment()
public java.lang.Object evaluate(java.lang.Object obj)
obj
- an Object
EObject
s, Java objects, a mixture, or even null
.
In any case, the results conform to the expression's
result typeQuery.evaluate()
,
Query.evaluate(List)
,
Query.resultType()
public java.lang.Object evaluate()
allInstances()
exclusively for evaluation.
EObject
s, Java objects, a mixture, or even null
.
In any case, the results conform to the expression's
result typeQuery.resultType()
public boolean check(java.lang.Object obj)
true
or false
according to
whether the constraint is metQuery.check(List)
public java.util.List evaluate(java.util.List objects)
objects
. Note that result elements may, themselves,
be collections of multiple results for a single input object.
In any case, the results conform to the expression's
result type#evaluate(EObject)
,
Query.resultType()
public boolean check(java.util.List objects)
objects
- a list of objects to evaluate the constraint on
true
if all of the objects
satisfy
the constraint (including the trivial case of an empty input list);
false
, otherwise#check(EObject)
public java.util.List select(java.util.List objects)
objects
that
satisfy the constraintpublic java.util.List reject(java.util.List objects)
objects
that
do not satisfy the constraintpublic org.eclipse.emf.ecore.EClassifier resultType()
EClassifier
in the user metamodel, or it may represent a core
Java language type (such as Boolean
in the case of constraints)
or an OCL data type.
public java.lang.String queryText()
public java.util.Map getExtentMap()
EClassifier
s representing OCL types to
their extents (set of all instances).
EClassifier
) to their extents
(List
)Query.setExtentMap(Map)
public OCLExpression getExpression()
If the meaning of the 'Expression' reference isn't clear, there really should be more of a description here...
QueryPackage.getQuery_Expression()
public void setExtentMap(java.util.Map extentMap)
EClassifier
s representing OCL types to
their extents (set of all instances).
extentMap
- a map of classifiers (EClassifier
) to their
extents (List
)Query.getExtentMap()
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |