|
UML Modeler | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOclQueryHelper
A convenience interface for the execution of OCL expressions and queries on EMF models.
Note that this interface is not intended to be implemented by clients.
| Method Summary | |
|---|---|
Object |
evaluate(EObject self,
String oclExpression,
IProgressMonitor monitor)
Evaluates the OCL expression specified by oclExpression using
self as the context for the expression evaluation. |
Set<Object> |
executeOclStatement(EObject self,
EClass selfType,
String oclStatement,
IProgressMonitor monitor)
Deprecated. Use the IOclQueryHelper.evaluate(EObject, String, IProgressMonitor)
method, instead, because it preserves the ordering of
collection-valued OCL expressions in case the expression is of an
ordered collection (list) type |
Set<EObject> |
executeQueryUsingOclFilter(EObject queryRoot,
EClass selfType,
String oclFilter,
IProgressMonitor monitor)
Executes a query using queryRoot as the root of the
subtree to be searched and an OCL filter specified by
oclFilter. |
| Method Detail |
|---|
Set<EObject> executeQueryUsingOclFilter(EObject queryRoot,
EClass selfType,
String oclFilter,
IProgressMonitor monitor)
throws InterruptedException,
InvalidOclExpressionException
queryRoot as the root of the
subtree to be searched and an OCL filter specified by
oclFilter. EObjects satisfying the OCL filter
condition are returned.
queryRoot - The root element to recursively searchselfType - Type of the "self" element specified in the query text. Use
null to specify a context-free OCL query (in
which case no syntactic validation of the OCL expression
can be performed)oclFilter - The string specifying the OCL query conditionmonitor - The monitor to use to display progress and/or cancel
EObjects in the queryRoot
subtree that match the oclFilter condition
InterruptedException - if the query operation was interrupted
InvalidOclExpressionException - if the specified OCL expression is invalid
IllegalArgumentException - if the oclFilter is an empty string
NullPointerException - if any argument is null
Set<Object> executeOclStatement(EObject self,
EClass selfType,
String oclStatement,
IProgressMonitor monitor)
throws InterruptedException,
InvalidOclExpressionException
IOclQueryHelper.evaluate(EObject, String, IProgressMonitor)
method, instead, because it preserves the ordering of
collection-valued OCL expressions in case the expression is of an
ordered collection (list) type
oclStatement using
self as the context for the statement evaluation. The
statement will only be applied to self without recursing
into its contents.
self - The context to use for the OCL statement evaluationselfType - Type of the self. Use null to
specify a context-free OCL statement (in which case no
syntactic validation of the OCL expression can be performed)oclStatement - The string specifying the OCL statementmonitor - The monitor to use to display progress and/or cancel
Objects produced by executing the OCL
statement. Can contain EObjects, Strings,
Numbers, even nulls. However, the result
itself will not be null
InterruptedException - if the statement execution was interrupted
InvalidOclExpressionException - if the specified oclStatement is invalid
IllegalArgumentException - if the oclStatement is an empty string
NullPointerException - if one of the arguments was null
Object evaluate(EObject self,
String oclExpression,
IProgressMonitor monitor)
throws InterruptedException,
InvalidOclExpressionException
oclExpression using
self as the context for the expression evaluation. The
expression will only be evaluated on self without
recursing into children.
self - The context to use for the OCL expression evaluationoclExpression - The string specifying the OCL expressionmonitor - The monitor to use to display progress and/or cancel
null if the expression's value is null or if it
is a statement that has no result typeEObject if the value is a model elementObject if the value is some primitive value or
other kind of Java object such as a string or a dateCollection of some kind if the value is some kind of
OCL collection. This may be an ordered collection
(List), a set (Set), or a bag
(Collection)InterruptedException - The expression evaluation was interrupted
InvalidOclExpressionException - The specified OCL expression is invalid
IllegalArgumentException - oclExpression/code> is an empty string
NullPointerException - One of the arguments was null
|
UML Modeler | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||