de.interactive_instruments.ShapeChange.TargetHelper
Class XpathConstraintNode.Select

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
      extended by de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode.Select
Enclosing class:
XpathConstraintNode

public static class XpathConstraintNode.Select
extends XpathConstraintNode

This class represents the Select iterator filter.


Nested Class Summary
 
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
 
Field Summary
protected  XpathConstraintNode generatorBody
           
protected  OclNode.Declaration vardecl
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
children, negated, parent, xpathHelper
 
Constructor Summary
XpathConstraintNode.Select(XpathHelper xpathHelper, OclNode.Declaration vardecl)
          Ctor
 
Method Summary
 boolean bindsVariable(OclNode.Declaration vardecl)
          This method determines whether the Select binds the given variable declaration.
 XpathConstraintNode.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.
 XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
          This compiles the Select node and its children to an Xpath expression fragment.
 
Methods inherited from class de.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
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 XpathConstraintNode generatorBody
Constructor Detail

XpathConstraintNode.Select

public XpathConstraintNode.Select(XpathHelper xpathHelper,
                                  OclNode.Declaration vardecl)
Ctor

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

bindsVariable

public boolean bindsVariable(OclNode.Declaration vardecl)
This method determines whether the Select binds the given variable declaration.

Overrides:
bindsVariable in class XpathConstraintNode
Parameters:
vardecl - The variable Declaration object
Returns:
Flag indicating the requested property

generatingAttribute

public XpathConstraintNode.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 XpathConstraintNode
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 XpathConstraintNode
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 XpathConstraintNode
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 XpathConstraintNode
Returns:
Flag indicating whether the node is an identity carrying type

translate

public XpathConstraintNode.XpathFragment translate(XpathConstraintNode.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 XpathConstraintNode
Parameters:
ctx - BindingContext this node shall be compiled in
Returns:
Object containing the fragment and its operator priority


Copyright © 2015. All rights reserved.