|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.TargetHelper.XpathConstraintNode
public abstract class XpathConstraintNode
XpathConstraintNode and its concrete derivations stand for a representation of OCL contents, which are close to the capabilities of Xpath/Schematron and the logic, which can be realized within Schematron Rules.
There are two basic patterns of use of these classes:
Nested Class Summary | |
---|---|
static class |
XpathConstraintNode.AllInstances
This class represents the OCL operation allInstances(). |
static class |
XpathConstraintNode.Arithmetic
This class stands for OCL arithmetic. |
static class |
XpathConstraintNode.Attribute
This class represents a chain of attribute selectors based on some value source such as a variable, a select() or allInstances. |
static class |
XpathConstraintNode.BindingContext
The primary information stored in this class is whether there is currently a nodeset context at all - NONE if the expression is not a nodeset - and if the context is currently identical to current() - ATCURRENT. |
static class |
XpathConstraintNode.Cast
This class represents oclAsType(), which is for casting a type to one of its subtypes. |
static class |
XpathConstraintNode.ChangeCase
This class stands for an the changeCase operations on the CharacterString object. |
static class |
XpathConstraintNode.Comparison
This class stands for comparisons. |
static class |
XpathConstraintNode.Concatenate
This class stands for an OCL concat operation. |
static class |
XpathConstraintNode.Empty
This one stands for the OCL isEmpty() and notEmpty() predicate operations. |
static class |
XpathConstraintNode.Error
This is generated for unimplemented material. |
static class |
XpathConstraintNode.Exists
This class represents the Exists iterator predicate. |
static class |
XpathConstraintNode.IfThenElse
This class represents an if ... then ... else ... endif construct. |
static class |
XpathConstraintNode.KindOf
This class represents oclIsKindOf and oclIsTypeOf nodes. |
static class |
XpathConstraintNode.Literal
This wraps any form of Literal value from the OclNode. |
static class |
XpathConstraintNode.Logic
This class stands for logical operations AND, OR, XOR and EQV. |
static class |
XpathConstraintNode.Matches
This class stands for matches operation, which this implemention added to OCL's core functions. |
static class |
XpathConstraintNode.MessageComment
This represents an error message comment. |
static class |
XpathConstraintNode.Select
This class represents the Select iterator filter. |
static class |
XpathConstraintNode.Size
This class represents an OCL invocation of the size operation. |
static class |
XpathConstraintNode.Substring
This class stands for an OCL substring operation. |
static class |
XpathConstraintNode.Unique
This class represents the isUnique iterator predicate. |
static class |
XpathConstraintNode.Variable
This class represents an OCL variable. |
static class |
XpathConstraintNode.XpathFragment
This auxiliary class encapsulates an Xpath expression, which can be formulated using variables defined using <let> expressions of a Schematron <rule>. |
protected static class |
XpathConstraintNode.XpathType
Types of XPath |
Field Summary | |
---|---|
protected ArrayList<XpathConstraintNode> |
children
The children of the XpathConstraintNode |
protected boolean |
negated
General negation flag for all nodes |
protected XpathConstraintNode |
parent
The parent reference |
protected XpathHelper |
xpathHelper
Link back to XpathHelper object |
Constructor Summary | |
---|---|
XpathConstraintNode()
|
Method Summary | |
---|---|
void |
addChild(XpathConstraintNode child)
Method to add children to a node and at the same time establish the node as parent of the child to be added. |
boolean |
bindsVariable(OclNode.Declaration vardecl)
This method determines whether the node binds the given variable declaration. |
boolean |
containsError()
Find out whether this construct contains a node of type XpathConstraintNode.Error. |
XpathConstraintNode.Attribute |
generatingAttribute()
By means of this function you can inquire which Attribute node is generating the objects represented by this node. |
boolean |
hasIdentity()
This predicate finds out whether the given node is realized by means of a class, which conceptually has identity. |
boolean |
hasSimpleType()
This predicate finds out whether the given node is realized by means of a simple XML schema type. |
boolean |
isAndOrLogic(boolean isAnd)
Method to inquire whether the the node inquired is a Logic node AND this logic node has the same isAnd polarity as specified in the parameter. |
boolean |
isDependentOn(OclNode.Declaration vardecl)
This method determines whether the given expression depends on the Variable passed as argument. |
boolean |
isMultiple()
This predicate finds out whether the given node may produce a set. |
boolean |
isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether the given expression is a Variable or an Attribute based on a Variable, which is identical to the one passed as argument. |
abstract XpathConstraintNode.XpathFragment |
translate(XpathConstraintNode.BindingContext ctx)
This abstract method compiles a node to an XPath expression fragment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ArrayList<XpathConstraintNode> children
protected boolean negated
protected XpathConstraintNode parent
protected XpathHelper xpathHelper
Constructor Detail |
---|
public XpathConstraintNode()
Method Detail |
---|
public void addChild(XpathConstraintNode child)
child
- The Child node to be addedpublic boolean isAndOrLogic(boolean isAnd)
Method to inquire whether the the node inquired is a Logic node AND this logic node has the same isAnd polarity as specified in the parameter.
This implementation installs the default for all derivations except Logic.
isAnd
- Flag: Are we an AND? (not an OR)?
public boolean isDependentOn(OclNode.Declaration vardecl)
This method determines whether the given expression depends on the Variable passed as argument.
This implementation defines the default behavior: Descend down and try to find the variable somewhere.
vardecl
- The Declaration of the variable
public boolean bindsVariable(OclNode.Declaration vardecl)
vardecl
- The variable Declaration object
public boolean isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether the given expression is a Variable or an Attribute based on a Variable, which is identical to the one passed as argument.
This implementation defines the default behavior.
vardecl
- The Declaration of the variable
public XpathConstraintNode.Attribute generatingAttribute()
By means of this function you can inquire which Attribute node is generating the objects represented by this node. Note that invocation is only sensible for iterators and attributes.
public boolean isMultiple()
This predicate finds out whether the given node may produce a set.
This is the default implementation providing the value false.
public boolean hasSimpleType()
This predicate finds out whether the given node is realized by means of a simple XML schema type.
public boolean hasIdentity()
This predicate finds out whether the given node is realized by means of a class, which conceptually has identity.
public boolean containsError()
Find out whether this construct contains a node of type XpathConstraintNode.Error. In this case the whole tree is in error.
public abstract XpathConstraintNode.XpathFragment translate(XpathConstraintNode.BindingContext ctx)
This abstract method compiles a node to an XPath expression fragment.
ctx
- BindingContext this node shall be compiled in
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |