de.interactive_instruments.ShapeChange.Target.XmlSchema
Class SchematronConstraintNode.KindOf
java.lang.Object
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode.KindOf
- Enclosing class:
- SchematronConstraintNode
public static class SchematronConstraintNode.KindOf
- extends SchematronConstraintNode
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.Target.XmlSchema.SchematronConstraintNode |
SchematronConstraintNode.AllInstances, SchematronConstraintNode.Arithmetic, SchematronConstraintNode.Attribute, SchematronConstraintNode.BindingContext, SchematronConstraintNode.Cast, SchematronConstraintNode.ChangeCase, SchematronConstraintNode.Comparison, SchematronConstraintNode.Concatenate, SchematronConstraintNode.Empty, SchematronConstraintNode.Error, SchematronConstraintNode.Exists, SchematronConstraintNode.IfThenElse, SchematronConstraintNode.KindOf, SchematronConstraintNode.Let, SchematronConstraintNode.Literal, SchematronConstraintNode.Logic, SchematronConstraintNode.Matches, SchematronConstraintNode.MessageComment, SchematronConstraintNode.Select, SchematronConstraintNode.Size, SchematronConstraintNode.Substring, SchematronConstraintNode.Unique, SchematronConstraintNode.Variable, SchematronConstraintNode.XpathFragment, SchematronConstraintNode.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
SchematronConstraintNode.KindOf
public SchematronConstraintNode.KindOf(SchematronSchema schemaObject,
boolean exact,
boolean neg)
- Ctor
- Parameters:
schemaObject
- 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 SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.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 SchematronConstraintNode
- Parameters:
ctx
- BindingContext this node shall be compiled in
- Returns:
- Object containing the Xpath fragment
Copyright © 2015. All rights reserved.