public static class XpathConstraintNode.Variable 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
Modifier and Type | Field and Description |
---|---|
protected OclNode.Declaration |
vardecl |
children, negated, parent, xpathHelper
Constructor and Description |
---|
Variable(XpathHelper xpathHelper,
OclNode.Declaration vardecl,
boolean neg)
Ctor
|
Modifier and Type | Method and Description |
---|---|
XpathConstraintNode.Attribute |
generatingAttribute()
This inquires the Attribute node this Variable is generated
by if any.
|
String |
getName()
Variable name inquiry function.
|
boolean |
hasIdentity()
This predicate finds out whether the Variable results in an
instance, which conceptually has identity.
|
boolean |
hasSimpleType()
This predicate finds out whether the Variable results in a simple
XML schema type.
|
boolean |
isDependentOn(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the
one passed as argument.
|
boolean |
isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the
one passed as argument.
|
XpathConstraintNode.XpathFragment |
translate(XpathConstraintNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for
the given variable.
|
addChild, bindsVariable, containsError, isAndOrLogic, isMultiple
protected OclNode.Declaration vardecl
public Variable(XpathHelper xpathHelper, OclNode.Declaration vardecl, boolean neg)
xpathHelper
- The schema objectvardecl
- OclNode.Declaration objectneg
- Negation flagpublic String getName()
public boolean isDependentOn(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument.
isDependentOn
in class XpathConstraintNode
vardecl
- The Declaration of the variablepublic boolean isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument.
isVarOrAttribBased
in class XpathConstraintNode
vardecl
- The Declaration of the variablepublic XpathConstraintNode.Attribute generatingAttribute()
This inquires the Attribute node this Variable is generated by if any.
generatingAttribute
in class XpathConstraintNode
public boolean hasSimpleType()
This predicate finds out whether the Variable results in a simple XML schema type.
hasSimpleType
in class XpathConstraintNode
public boolean hasIdentity()
This predicate finds out whether the Variable results in an instance, which conceptually has identity.
hasIdentity
in class XpathConstraintNode
public XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for the given variable.
The only variable which can be properly translated in all cases is self, which will be mapped to current() or to '.', if compiled in a ISCURRENT context. Other variables require to be on the context stack of the expression, which is widely dependent on how the expression environment could be represented in Xpath.
translate
in class XpathConstraintNode
ctx
- BindingContext this node shall be compiled inCopyright © 2017. All rights reserved.