de.interactive_instruments.ShapeChange.Target.XmlSchema
Class SchematronConstraintNode.Exists
java.lang.Object
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode.Exists
- Enclosing class:
- SchematronConstraintNode
public static class SchematronConstraintNode.Exists
- extends SchematronConstraintNode
This class represents the Exists iterator predicate. Being part of the
Logic system Exists can be negated, which is realized by applying an
additional not(). Note that Exists also realizes the forAll() iterator.
The mapping according to the rules of 1st order logic is achieved when
the Exists node is created.
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchematronConstraintNode.Exists
public SchematronConstraintNode.Exists(SchematronSchema schemaObject,
OclNode.Declaration vardecl,
boolean neg)
- Ctor
- Parameters:
schemaObject
- The schema objectvardecl
- OclNode.Declaration objectneg
- Negation flag
nodeVariableIsBoundTo
public SchematronConstraintNode nodeVariableIsBoundTo(OclNode.Declaration vardecl)
- This method determines whether the Exists 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
translate
public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
This compiles the 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. If negated an additional not() is applied.
- 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.