de.interactive_instruments.ShapeChange.TargetHelper
Class XpathConstraintNode.KindOf
java.lang.Object
de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode.KindOf
- Enclosing class:
- XpathConstraintNode
public static class XpathConstraintNode.KindOf
- extends XpathConstraintNode
This class represents oclIsKindOf and oclIsTypeOf nodes. The difference
between the two is expressed in an exact flag. The object also
carries a negation flag to express that an object is NOT kind of some
type. The type is given by the first of the children.
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 |
argumentClass
protected ClassInfo argumentClass
exact
protected boolean exact
XpathConstraintNode.KindOf
public XpathConstraintNode.KindOf(XpathHelper xpathHelper,
boolean exact,
boolean neg)
- Ctor
- Parameters:
xpathHelper
- The schema objectexact
- Flag: Only check the given typeneg
- Flag: Negated meaning
setClass
public void setClass(ClassInfo ci)
- If the class to be tested against is already known (it is not an
expression) this reference can be set via this method.
- Parameters:
ci
- ClassInfo representing the type to be tested against
translate
public XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
This compiles the KindOf predicate (and its negation) to an
equivalent Xpath expression fragment. KindOf is translated to
a predicate which compares the element name against all concrete
subtypes of the given type.
- Specified by:
translate
in class XpathConstraintNode
- Parameters:
ctx
- BindingContext this node shall be compiled in
- Returns:
- Object containing the Xpath fragment
Copyright © 2015. All rights reserved.