org.writersforge.catalan.templates.generic
Class LiteralOp

java.lang.Object
  extended byorg.writersforge.catalan.templates.generic.GenericOp
      extended byorg.writersforge.catalan.templates.generic.ContentOp
          extended byorg.writersforge.catalan.templates.generic.LiteralOp

public class LiteralOp
extends ContentOp

A template op wrapper for <literal> and static text. Does not attempt to look anything up in the input data document, but does allow for styles.

Author:
jsheets

Constructor Summary
LiteralOp(org.writersforge.bellows.Datum op, StyleMap styleMap)
          Creates a new instance of LiteralOp.
LiteralOp(org.writersforge.bellows.Datum op, StyleMap styleMap, StyleChain chain)
          Creates a new instance of LiteralOp with an optional StyleChain fallback.
 
Method Summary
 java.lang.String getText()
          Retrieves the PCDATA text content from the current literal op.
 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

LiteralOp

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

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

LiteralOp

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

getText

public java.lang.String getText()
Retrieves the PCDATA text content from the current literal op.

Returns:
the text contents of 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.