public static class XpathConstraintNode.Logic extends XpathConstraintNode
This class stands for logical operations AND, OR, XOR and EQV. Which of these is is coded in the state member logic.
Modifier and Type | Class and Description |
---|---|
protected static class |
XpathConstraintNode.Logic.LogicType |
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
Modifier and Type | Field and Description |
---|---|
protected XpathConstraintNode.Logic.LogicType |
logic |
children, negated, parent, xpathHelper
Constructor and Description |
---|
Logic(XpathHelper xpathHelper,
XpathConstraintNode.Logic.LogicType logic)
Ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAndOrLogic(boolean isAnd)
Method to inquire whether the node inquired is a Logic node and
this logic node has the same isAnd polarity as specified in
the parameter.
|
XpathConstraintNode.XpathFragment |
translate(XpathConstraintNode.BindingContext ctx)
This compiles the node and its children to an Xpath predicate,
which can be inserted into a <rule>.
|
addChild, bindsVariable, containsError, generatingAttribute, hasIdentity, hasSimpleType, isDependentOn, isMultiple, isVarOrAttribBased
protected XpathConstraintNode.Logic.LogicType logic
public Logic(XpathHelper xpathHelper, XpathConstraintNode.Logic.LogicType logic)
xpathHelper
- The schema objectisAnd
- Flag to make this an AND (true) or an OR (false)public boolean isAndOrLogic(boolean isAnd)
Method to inquire whether the node inquired is a Logic node and this logic node has the same isAnd polarity as specified in the parameter. XORs and EQVs are ignored and yield false.
isAndOrLogic
in class XpathConstraintNode
isAnd
- Flag: Are we an AND? (not an OR)?public XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
This compiles the node and its children to an Xpath predicate, which can be inserted into a <rule>.
AND and OR are translated into their Xpath counterparts and and or. XOR will be realized as a != operator, EQV by an = operator.
translate
in class XpathConstraintNode
ctx
- BindingContext this node shall be compiled inCopyright © 2018. All rights reserved.