de.interactive_instruments.ShapeChange.TargetHelper
Class XpathConstraintNode.Exists
java.lang.Object
de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode.Exists
- Enclosing class:
- XpathConstraintNode
public static class XpathConstraintNode.Exists
- extends XpathConstraintNode
This class represents the Exists iterator predicate. Being part of the
Logic system Exists can be negated, which is realized by applying an
additional not(). Note that Exists also realizes the forAll() iterator.
The mapping according to the rules of 1st order logic is achieved when
the Exists node is created.
Nested classes/interfaces inherited from class de.interactive_instruments.ShapeChange.TargetHelper.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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XpathConstraintNode.Exists
public XpathConstraintNode.Exists(XpathHelper xpathHelper,
OclNode.Declaration vardecl,
boolean neg)
- Ctor
- Parameters:
xpathHelper
- The schema objectvardecl
- OclNode.Declaration objectneg
- Negation flag
bindsVariable
public boolean bindsVariable(OclNode.Declaration vardecl)
- This method determines whether the Exists binds the given variable
declaration.
- Overrides:
bindsVariable
in class XpathConstraintNode
- Parameters:
vardecl
- The variable Declaration object
- Returns:
- Flag indicating the requested property
translate
public 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.
- Specified by:
translate
in class XpathConstraintNode
- Parameters:
ctx
- BindingContext this node shall be compiled in
- Returns:
- Object containing the fragment and its operator priority
Copyright © 2015. All rights reserved.