org.apache.shale.clay.parser.builder
Class IgnoreBuilder

java.lang.Object
  extended by org.apache.shale.clay.parser.builder.Builder
      extended by org.apache.shale.clay.parser.builder.VerbatimBuilder
          extended by org.apache.shale.clay.parser.builder.CommentBuilder
              extended by org.apache.shale.clay.parser.builder.IgnoreBuilder

public class IgnoreBuilder
extends CommentBuilder

This Builder is designed to ignore processing on a block of HTML. If the jsfid attribute of the HTML node is "ignore", all of the child nodes under the marked nodes are excluded from further processing. The are treated like a verbatim block. The outer node is removed from the output.


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
IgnoreBuilder()
           
 
Method Summary
protected  void captureComment(Node node, StringBuffer commentBody)
          Recursively traverses the children of the HTML Node concatenating the raw text of each Token into the commentBody.
protected  void encodeBegin(Node node, ElementBean target, ComponentBean root)
          Builds a outputText component.
protected  String getJsfid(Node node)
          Returns the jsfid for the target ElementBean.
 
Methods inherited from class org.apache.shale.clay.parser.builder.CommentBuilder
encodeEnd, getBuildNodeBody
 
Methods inherited from class org.apache.shale.clay.parser.builder.VerbatimBuilder
assignAttributes, getComponentType
 
Methods inherited from class org.apache.shale.clay.parser.builder.Builder
assignNode, createAttribute, createElement, encode, encodeChildren, getBuilder, getRenderId, isChildrenAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreBuilder

public IgnoreBuilder()
Method Detail

getJsfid

protected String getJsfid(Node node)

Returns the jsfid for the target ElementBean.

Overrides:
getJsfid in class VerbatimBuilder
Parameters:
node - markup
Returns:
jsfid

encodeBegin

protected void encodeBegin(Node node,
                           ElementBean target,
                           ComponentBean root)

Builds a outputText component. The attribute value is the content of the child nodes. The root HTML Node is not included in the content of the target ElementBean node.

Overrides:
encodeBegin in class CommentBuilder
Parameters:
node - markup
target - child config bean
root - parent config bean

captureComment

protected void captureComment(Node node,
                              StringBuffer commentBody)

Recursively traverses the children of the HTML Node concatenating the raw text of each Token into the commentBody. Ending nodes are not kept with the parser. If a start node is found that is not self terminated, a matching ending node is created.

Overrides:
captureComment in class CommentBuilder
Parameters:
node - markup
commentBody - concatenated raw text of all the children


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.