|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode
de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode.Variable
public static class SchematronConstraintNode.Variable
This class represents an OCL variable. It wraps the Declaration node of the OclNode object. If it happens to be boolean it can be negated.
Nested Class Summary |
---|
Field Summary | |
---|---|
protected OclNode.Declaration |
vardecl
|
Fields inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode |
---|
children, negated, parent, schemaObject |
Constructor Summary | |
---|---|
SchematronConstraintNode.Variable(SchematronSchema schemaObject,
OclNode.Declaration vardecl,
boolean neg)
Ctor |
Method Summary | |
---|---|
SchematronConstraintNode.Attribute |
generatingAttribute()
This inquires the Attribute node this Variable is generated by if any. |
String |
getName()
Variable name inquiry function. |
boolean |
hasIdentity()
This predicate finds out whether the Variable results in an instance, which conceptually has identity. |
boolean |
hasSimpleType()
This predicate finds out whether the Variable results in a simple XML schema type. |
boolean |
isDependentOn(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument. |
boolean |
isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument. |
SchematronConstraintNode.XpathFragment |
translate(SchematronConstraintNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for the given variable. |
Methods inherited from class de.interactive_instruments.ShapeChange.Target.XmlSchema.SchematronConstraintNode |
---|
addChild, containsError, isAndOrLogic, isMultiple, nodeVariableIsBoundTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OclNode.Declaration vardecl
Constructor Detail |
---|
public SchematronConstraintNode.Variable(SchematronSchema schemaObject, OclNode.Declaration vardecl, boolean neg)
schemaObject
- The schema objectvardecl
- OclNode.Declaration objectneg
- Negation flagMethod Detail |
---|
public String getName()
public boolean isDependentOn(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument.
isDependentOn
in class SchematronConstraintNode
vardecl
- The Declaration of the variable
public boolean isVarOrAttribBased(OclNode.Declaration vardecl)
This method determines whether this variable is identical to the one passed as argument.
isVarOrAttribBased
in class SchematronConstraintNode
vardecl
- The Declaration of the variable
public SchematronConstraintNode.Attribute generatingAttribute()
This inquires the Attribute node this Variable is generated by if any.
generatingAttribute
in class SchematronConstraintNode
public boolean hasSimpleType()
This predicate finds out whether the Variable results in a simple XML schema type.
hasSimpleType
in class SchematronConstraintNode
public boolean hasIdentity()
This predicate finds out whether the Variable results in an instance, which conceptually has identity.
hasIdentity
in class SchematronConstraintNode
public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
This compiles a node to an Xpath expression, which stands for the given variable.
If the variable is defined in a surrounding 'let' construct, a proper translation for the use of the variable can always be achieved, given that the initial value of the variable translates properly. If the use of the variable is in ISCURRENT context, the variable definition will be mapped into a Schematron <let> definition. Otherwise the initial value is substituted in place of the variable.
Other variable references are treated as follows.
The only variable which can be properly translated in all cases is self, which will be mapped to current() or to '.', if compiled in a ISCURRENT context. Variable definitions from iterators require to be on the context stack of the expression, which is widely dependent on how the expression environment could be represented in Xpath.
translate
in class SchematronConstraintNode
ctx
- BindingContext this node shall be compiled in
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |