Class XmlFlow<T>

java.lang.Object
com.norconex.commons.lang.xml.flow.XmlFlow<T>
Type Parameters:
T - type of the object to be submitted to the flow.

public final class XmlFlow<T> extends Object

Treats an XML block as being a mix of predicate and consumer classes to create an execution "flow". The XML syntax below can be used create conditional Predicate statements deciding whether to execute or not Consumer objects.

XML Syntax

 <!-- Proceeds if condition is true. -->
 <if>
   <!--
     A single XML "condition" or "conditions" (i.e., condition group).
     A condition group accepts an operator. Example:
     -->
   <conditions operator="[AND|OR]">
     <!--
       Unless you have a default implementation configured, "condition"
       expects a "class" attribute pointing to a Predicate implementation.
       E.g.:
       -->
     <condition class="(a Predicate implementation)"/>
     <condition class="(a Predicate implementation)"/>
   </conditions>
   <then>
     <!--
       Holds one or more XML elements with a "class" attribute pointing to a
       Consumer implementation. Executed when above condition or condition
       group evaluates to true. Can also contain nested if/ifNot blocks.
       -->
   </then>
   <else>
     <!--
       Optional. Same as "then" above, but triggered if the condition
       evaluates to false. Can also contain nested if/ifNot blocks.
       -->
   </else>
 </if>

 <!-- Proceed if condition is false. -->
 <ifNot>
   <!-- Same as "if" tag -->
 </ifNot>
 
Since:
2.0.0