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

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
      extended by de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode.Select
Enclosing class:
SchematronConstraintNode

public static class SchematronConstraintNode.Select
extends SchematronConstraintNode

This class represents the Select iterator filter.


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  SchematronConstraintNode generatorBody
           
protected  OclNode.Declaration vardecl
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
children, negated, parent, schemaObject
 
Constructor Summary
SchematronConstraintNode.Select(SchematronSchema schemaObject, OclNode.Declaration vardecl)
          Ctor
 
Method Summary
 SchematronConstraintNode.Attribute generatingAttribute()
          By means of this function you can inquire which Attribute node is generating the objects of this Select node if any.
 boolean hasIdentity()
          This predicate finds out whether the Select results in a collection of instances, which conceptually have identity.
 boolean hasSimpleType()
          This predicate finds out whether the Select results in a simple XML schema type.
 boolean isMultiple()
          The value of Select is always a set.
 SchematronConstraintNode nodeVariableIsBoundTo(OclNode.Declaration vardecl)
          This method determines whether the Select binds the given variable declaration and if it does, which is the expression the variable is bound to.
 SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
          This compiles the Select node and its children to an Xpath expression fragment.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
addChild, containsError, isAndOrLogic, isDependentOn, isVarOrAttribBased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vardecl

protected OclNode.Declaration vardecl

generatorBody

protected SchematronConstraintNode generatorBody
Constructor Detail

SchematronConstraintNode.Select

public SchematronConstraintNode.Select(SchematronSchema schemaObject,
                                       OclNode.Declaration vardecl)
Ctor

Parameters:
schemaObject - The schema object
vardecl - OclNode.Declaration object
Method Detail

nodeVariableIsBoundTo

public SchematronConstraintNode nodeVariableIsBoundTo(OclNode.Declaration vardecl)
This method determines whether the Select binds the given variable declaration and if it does, which is the expression the variable is bound to.

Overrides:
nodeVariableIsBoundTo in class SchematronConstraintNode
Parameters:
vardecl - The variable Declaration object
Returns:
Node the variable is bound to or null

generatingAttribute

public SchematronConstraintNode.Attribute generatingAttribute()

By means of this function you can inquire which Attribute node is generating the objects of this Select node if any.

Overrides:
generatingAttribute in class SchematronConstraintNode
Returns:
The retrieved Attribute node if there is such a thing

isMultiple

public boolean isMultiple()

The value of Select is always a set.

Overrides:
isMultiple in class SchematronConstraintNode
Returns:
Flag indicating whether the node can return multiple values

hasSimpleType

public boolean hasSimpleType()

This predicate finds out whether the Select results in a simple XML schema type.

Overrides:
hasSimpleType in class SchematronConstraintNode
Returns:
Flag indicating whether the node has a simple type

hasIdentity

public boolean hasIdentity()

This predicate finds out whether the Select results in a collection of instances, which conceptually have identity.

Overrides:
hasIdentity in class SchematronConstraintNode
Returns:
Flag indicating whether the node is an identity carrying type

translate

public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)

This compiles the Select node and its children to an Xpath expression fragment.

The object is translated in the given context and its ending position, supplemented by the binding variable, defines the context for the compilation of the body, which is appended as a predicate bracket. Note that Select is very similar to Exists - the only diffence being that the result is not interpreted in a Boolean way.

Specified by:
translate in class SchematronConstraintNode
Parameters:
ctx - BindingContext this node shall be compiled in
Returns:
Object containing the fragment and its operator priority


Copyright © 2015. All rights reserved.