org.writersforge.catalan.templates.generic
Class IfOp

java.lang.Object
  |
  +--org.writersforge.catalan.templates.generic.GenericOp
        |
        +--org.writersforge.catalan.templates.generic.CommandOp
              |
              +--org.writersforge.catalan.templates.generic.IfOp

public class IfOp
extends CommandOp

A template op wrapper for <if> and <if-not>.

Author:
jsheets

Constructor Summary
IfOp(org.writersforge.bellows.Datum op, StyleMap styleMap)
          Creates a new instance of IfOp.
IfOp(org.writersforge.bellows.Datum op, StyleMap styleMap, StyleChain chain)
          Creates a new instance of IfOp with an optional StyleChain fallback.
 
Method Summary
 java.lang.String getMatch()
          Returns the 'match' property of the op, or "" if 'match' is not specified.
 java.util.List resolve(org.writersforge.bellows.Datum xmlNode)
          Runs a Datum XML node through the op and returns a List of LayoutArea objects.
 
Methods inherited from class org.writersforge.catalan.templates.generic.GenericOp
createOp, createOp, getChain, getDatum, getDatumProperty, getOp, getOpType, getParameter, getStyleMap, resolveParameter, resolvePath, runQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfOp

public IfOp(org.writersforge.bellows.Datum op,
            StyleMap styleMap)
Creates a new instance of IfOp.

Parameters:
op - the XML template op to wrap
styleMap - the StyleMap to lookup named styles in

IfOp

public IfOp(org.writersforge.bellows.Datum op,
            StyleMap styleMap,
            StyleChain chain)
Creates a new instance of IfOp with an optional StyleChain fallback. The StyleChain can be null.

Parameters:
op - the XML template op to wrap
styleMap - the StyleMap to lookup named styles in
chain - optional fallback StyleChain
Method Detail

getMatch

public java.lang.String getMatch()
Returns the 'match' property of the op, or "" if 'match' is not specified. The path is an XPath-style query for data lookup.

Returns:
the query path for this op

resolve

public java.util.List resolve(org.writersforge.bellows.Datum xmlNode)
Runs a Datum XML node through the op and returns a List of LayoutArea objects.

Specified by:
resolve in class GenericOp
Parameters:
xmlNode - the input data node to run through the op
Returns:
a List of LayoutArea objects.