public static class XpathConstraintNode.Exists extends XpathConstraintNode
XpathConstraintNode.AllInstances, XpathConstraintNode.Arithmetic, XpathConstraintNode.Attribute, XpathConstraintNode.BindingContext, XpathConstraintNode.Cast, XpathConstraintNode.ChangeCase, XpathConstraintNode.Comparison, XpathConstraintNode.Concatenate, XpathConstraintNode.Empty, XpathConstraintNode.Error, XpathConstraintNode.Exists, XpathConstraintNode.IfThenElse, XpathConstraintNode.KindOf, XpathConstraintNode.Literal, XpathConstraintNode.Logic, XpathConstraintNode.Matches, XpathConstraintNode.MessageComment, XpathConstraintNode.Select, XpathConstraintNode.Size, XpathConstraintNode.Substring, XpathConstraintNode.Unique, XpathConstraintNode.Variable, XpathConstraintNode.XpathFragment, XpathConstraintNode.XpathType
children, negated, parent, xpathHelper
Constructor and Description |
---|
Exists(XpathHelper xpathHelper,
OclNode.Declaration vardecl,
boolean neg)
Ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
bindsVariable(OclNode.Declaration vardecl)
This method determines whether the Exists binds the given variable
declaration.
|
XpathConstraintNode.XpathFragment |
translate(XpathConstraintNode.BindingContext ctx)
This compiles the node and its children to an Xpath expression
fragment.
|
addChild, containsError, generatingAttribute, hasIdentity, hasSimpleType, isAndOrLogic, isDependentOn, isMultiple, isVarOrAttribBased
public Exists(XpathHelper xpathHelper, OclNode.Declaration vardecl, boolean neg)
xpathHelper
- The schema objectvardecl
- OclNode.Declaration objectneg
- Negation flagpublic boolean bindsVariable(OclNode.Declaration vardecl)
bindsVariable
in class XpathConstraintNode
vardecl
- The variable Declaration objectpublic XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
This compiles the node and its children to an Xpath expression fragment.
The object is translated in the given context and its ending position, supplemented by the binding variable, defines the context for the compilation of the body, which is appended as a predicate bracket. If negated an additional not() is applied.
translate
in class XpathConstraintNode
ctx
- BindingContext this node shall be compiled inCopyright © 2018. All rights reserved.