org.writersforge.catalan.templates.generic
Class TextOp

java.lang.Object
  |
  +--org.writersforge.catalan.templates.generic.GenericOp
        |
        +--org.writersforge.catalan.templates.generic.ContentOp
              |
              +--org.writersforge.catalan.templates.generic.TextOp

public class TextOp
extends ContentOp

A template op describing a run of renderable text. If the op takes the form of the <text> element, the content is the result of a lookup on the 'select' property. If the op is a <paragraph>, the 'select' property is ignored and the content is assembled from the child ops of this op.

Author:
jsheets

Constructor Summary
TextOp(org.writersforge.bellows.Datum op, StyleMap styleMap)
          Creates a new instance of TextOp.
TextOp(org.writersforge.bellows.Datum op, StyleMap styleMap, StyleChain chain)
          Creates a new instance of TextOp with an optional StyleChain fallback.
 
Method Summary
 java.lang.String getProperty()
          Returns the 'property' property of the op, or null if 'property' is not specified.
 java.lang.String getSelect()
          Returns the 'select' property of the op, or "" if 'select' 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

TextOp

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

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

TextOp

public TextOp(org.writersforge.bellows.Datum op,
              StyleMap styleMap,
              StyleChain chain)
Creates a new instance of TextOp 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

getSelect

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

Returns:
the query path for this op

getProperty

public java.lang.String getProperty()
Returns the 'property' property of the op, or null if 'property' is not specified.

Returns:
the 'property' value 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.