public interface IOclQueryHelper
Note that this interface is not intended to be implemented by clients.
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(org.eclipse.emf.ecore.EObject self,
java.lang.String oclExpression,
org.eclipse.core.runtime.IProgressMonitor monitor)
Evaluates the OCL expression specified by
oclExpression using
self as the context for the expression evaluation. |
java.util.Set<java.lang.Object> |
executeOclStatement(org.eclipse.emf.ecore.EObject self,
org.eclipse.emf.ecore.EClass selfType,
java.lang.String oclStatement,
org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated.
Use the
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 |
java.util.Set<org.eclipse.emf.ecore.EObject> |
executeQueryUsingOclFilter(org.eclipse.emf.ecore.EObject queryRoot,
org.eclipse.emf.ecore.EClass selfType,
java.lang.String oclFilter,
org.eclipse.core.runtime.IProgressMonitor monitor)
Executes a query using
queryRoot as the root of the
subtree to be searched and an OCL filter specified by
oclFilter . |
java.util.Set<org.eclipse.emf.ecore.EObject> executeQueryUsingOclFilter(org.eclipse.emf.ecore.EObject queryRoot, org.eclipse.emf.ecore.EClass selfType, java.lang.String oclFilter, org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.InterruptedException, InvalidOclExpressionException
queryRoot
as the root of the
subtree to be searched and an OCL filter specified by
oclFilter
. EObject
s 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 cancelEObject
s in the queryRoot
subtree that match the oclFilter
conditionjava.lang.InterruptedException
- if the query operation was interruptedInvalidOclExpressionException
- if the specified OCL expression is invalidjava.lang.IllegalArgumentException
- if the oclFilter
is an empty stringjava.lang.NullPointerException
- if any argument is null
java.util.Set<java.lang.Object> executeOclStatement(org.eclipse.emf.ecore.EObject self, org.eclipse.emf.ecore.EClass selfType, java.lang.String oclStatement, org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.InterruptedException, InvalidOclExpressionException
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) typeoclStatement
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 cancelObject
s produced by executing the OCL
statement. Can contain EObject
s, String
s,
Number
s, even null
s. However, the result
itself will not be null
java.lang.InterruptedException
- if the statement execution was interruptedInvalidOclExpressionException
- if the specified oclStatement
is invalidjava.lang.IllegalArgumentException
- if the oclStatement
is an empty stringjava.lang.NullPointerException
- if one of the arguments was null
java.lang.Object evaluate(org.eclipse.emf.ecore.EObject self, java.lang.String oclExpression, org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.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 cancelnull
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
)java.lang.InterruptedException
- The expression evaluation was interruptedInvalidOclExpressionException
- The specified OCL expression is invalidjava.lang.IllegalArgumentException
- oclExpression/code> is an empty string
java.lang.NullPointerException
- One of the arguments was null