public abstract class SchematronConstraintNode extends Object
SchematronConstraintNode and its concrete derivations stand for a representation of OCL contents, which are close to the capabilities of Schematron and the logic, which can be realized within Schematron Rules.
There are two basic patterns of use of these classes:
Modifier and Type | Class and Description |
---|---|
static class |
SchematronConstraintNode.AllInstances
This class represents the OCL operation allInstances().
|
static class |
SchematronConstraintNode.Arithmetic
This class stands for OCL arithmetic.
|
static class |
SchematronConstraintNode.Attribute
This class represents a chain of attribute selectors based on some
value source such as a variable, a select() or allInstances.
|
static class |
SchematronConstraintNode.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 |
SchematronConstraintNode.Cast
This class represents oclAsType(), which is for casting a type to one of
its subtypes.
|
static class |
SchematronConstraintNode.ChangeCase
This class stands for an the changeCase operations on the CharacterString
object.
|
static class |
SchematronConstraintNode.Comparison
This class stands for comparisons.
|
static class |
SchematronConstraintNode.Concatenate
This class stands for an OCL concat operation.
|
static class |
SchematronConstraintNode.Empty
This one stands for the OCL isEmpty() and notEmpty()
predicate operations.
|
static class |
SchematronConstraintNode.Error
This is generated for unimplemented material.
|
static class |
SchematronConstraintNode.Exists
This class represents the Exists iterator predicate.
|
static class |
SchematronConstraintNode.IfThenElse
This class represents an if ... then ... else ... endif construct.
|
static class |
SchematronConstraintNode.KindOf
This class represents oclIsKindOf and oclIsTypeOf nodes.
|
static class |
SchematronConstraintNode.Let
This class represents the 'let' construct.
|
static class |
SchematronConstraintNode.Literal
This wraps any form of Literal value from the OclNode.
|
static class |
SchematronConstraintNode.Logic
This class stands for logical operations AND, OR, XOR and EQV.
|
static class |
SchematronConstraintNode.Matches
This class stands for matches operation, which this implemention added
to OCL's core functions.
|
static class |
SchematronConstraintNode.MessageComment
This represents an error message comment.
|
static class |
SchematronConstraintNode.Select
This class represents the Select iterator filter.
|
static class |
SchematronConstraintNode.Size
This class represents an OCL invocation of the size operation.
|
static class |
SchematronConstraintNode.Substring
This class stands for an OCL substring operation.
|
static class |
SchematronConstraintNode.Unique
This class represents the isUnique iterator predicate.
|
static class |
SchematronConstraintNode.Variable
This class represents an OCL variable.
|
protected static class |
SchematronConstraintNode.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 |
SchematronConstraintNode.XpathType
Types of XPath
|
Modifier and Type | Field and Description |
---|---|
protected ArrayList<SchematronConstraintNode> |
children
The children of the SchematronConstraintNode
|
protected boolean |
negated
General negation flag for all nodes
|
protected SchematronConstraintNode |
parent
The parent reference
|
protected SchematronSchema |
schemaObject
Link back to SchematronSchema object
|
Constructor and Description |
---|
SchematronConstraintNode() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(SchematronConstraintNode 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 |
containsError()
Find out whether this construct contains a node of type
SchematronConstraintNode.Error.
|
SchematronConstraintNode.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.
|
SchematronConstraintNode |
nodeVariableIsBoundTo(OclNode.Declaration vardecl)
This method determines whether the node binds the given variable
declaration (this can only happen for iterators) and if it does,
which is the expression the variable is bound to.
|
abstract SchematronConstraintNode.XpathFragment |
translate(SchematronConstraintNode.BindingContext ctx)
This abstract method compiles a node to an XPath expression
fragment.
|
protected ArrayList<SchematronConstraintNode> children
protected boolean negated
protected SchematronConstraintNode parent
protected SchematronSchema schemaObject
public void addChild(SchematronConstraintNode 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 variablepublic SchematronConstraintNode nodeVariableIsBoundTo(OclNode.Declaration vardecl)
vardecl
- The variable Declaration objectpublic 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 variablepublic SchematronConstraintNode.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 SchematronConstraintNode.Error. In this case the whole tree is in error.
public abstract SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
This abstract method compiles a node to an XPath expression fragment.
ctx
- BindingContext this node shall be compiled inCopyright © 2018. All rights reserved.