de.interactive_instruments.ShapeChange.Target.XmlSchema
Class SchematronConstraintNode.KindOf

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
      extended by 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 Class Summary
 
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
 
Field Summary
protected  ClassInfo argumentClass
           
protected  boolean exact
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
children, negated, parent, schemaObject
 
Constructor Summary
SchematronConstraintNode.KindOf(SchematronSchema schemaObject, boolean exact, boolean neg)
          Ctor
 
Method Summary
 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.
 SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
          This compiles the KindOf predicate (and its negation) to an equivalent Xpath expression fragment.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
addChild, containsError, generatingAttribute, hasIdentity, hasSimpleType, isAndOrLogic, isDependentOn, isMultiple, isVarOrAttribBased, nodeVariableIsBoundTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argumentClass

protected ClassInfo argumentClass

exact

protected boolean exact
Constructor Detail

SchematronConstraintNode.KindOf

public SchematronConstraintNode.KindOf(SchematronSchema schemaObject,
                                       boolean exact,
                                       boolean neg)
Ctor

Parameters:
schemaObject - The schema object
exact - Flag: Only check the given type
neg - Flag: Negated meaning
Method Detail

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.