public static class SchematronConstraintNode.Cast extends SchematronConstraintNode
This class represents oclAsType(), which is for casting a type to one of its subtypes.
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
Modifier and Type | Field and Description |
---|---|
protected ClassInfo |
argumentClass |
protected String |
targetClassName |
children, negated, parent, schemaObject
Constructor and Description |
---|
Cast(SchematronSchema schemaObject)
Ctor
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasIdentity()
This predicate finds out whether the Cast results in an instance,
which conceptually has identity.
|
boolean |
hasSimpleType()
This predicate finds out whether the Cast results in a simple
XML schema type.
|
void |
setClass(ClassInfo ci)
If the class to be cast to is already known (it is not an
expression) this reference can be set via this method.
|
SchematronConstraintNode.XpathFragment |
translate(SchematronConstraintNode.BindingContext ctx)
This compiles the Cast to an Xpath fragment.
|
addChild, containsError, generatingAttribute, isAndOrLogic, isDependentOn, isMultiple, isVarOrAttribBased, nodeVariableIsBoundTo
protected ClassInfo argumentClass
protected String targetClassName
public Cast(SchematronSchema schemaObject)
schemaObject
- The schema objectpublic void setClass(ClassInfo ci)
ci
- ClassInfo representing the type to be cast topublic boolean hasSimpleType()
This predicate finds out whether the Cast results in a simple XML schema type.
hasSimpleType
in class SchematronConstraintNode
public boolean hasIdentity()
This predicate finds out whether the Cast results in an instance, which conceptually has identity.
hasIdentity
in class SchematronConstraintNode
public SchematronConstraintNode.XpathFragment translate(SchematronConstraintNode.BindingContext ctx)
This compiles the Cast to an Xpath fragment.
We realize this by making sure the current element is of the requested type or any of its concrete subtypes.
translate
in class SchematronConstraintNode
ctx
- BindingContext this node shall be compiled inCopyright © 2018. All rights reserved.