org.infolayer.templates.elements
Class TE_switch

java.lang.Object
  extended byorg.kxml2.kdom.Element
      extended byorg.infolayer.templates.TemplateElement
          extended byorg.infolayer.templates.elements.TE_switch

public class TE_switch
extends TemplateElement

The <t:switch> element allows conditional processing of <t:case> sub-elements. The evaluation result of the expr-attribute is compared to the evaluation result of the expr-attribute of the case elements. Template processing continues in the first matching {\em<t:case>} element. The evaluation context remains unchanged.

When a matching case is found, no further sub-elements are examined; if no matching case is found, template processing continues in the optional {\em<t:otherwise>} element.

Attributes

expr
(required) : The result of the given OCL expression is compared to the expressions given in <t:case> sub-elements.

Restrictions for Child Elements

Allowed sub-elements are any number of <t:case> elements, followed by up to one <t:else> element.

See Also:
Serialized Form

Constructor Summary
TE_switch()
           
 
Method Summary
 void apply(XmlSerializer xw, IlRequest context, Bindings bindings)
          Applies the template mechanism.
 void init()
           
 
Methods inherited from class org.infolayer.templates.TemplateElement
applyChildren, assertNoChildren, assertNoChildren, getAttributeValue, getVarDefs, readTextContent, setVarDefs, writeAttributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TE_switch

public TE_switch()
Method Detail

init

public void init()
Overrides:
init in class TemplateElement

apply

public void apply(XmlSerializer xw,
                  IlRequest context,
                  Bindings bindings)
           throws java.io.IOException
Description copied from class: TemplateElement
Applies the template mechanism. Must be overwritten in the

Overrides:
apply in class TemplateElement
Throws:
java.io.IOException