dochelper.EscapedMatchTransformDefinition Class Reference

The class EscapedMatchNodeDefinition implements Render Definition to handle the rendering of matches that include characters that should be escaped when creating a DOM node. More...

Inheritance diagram for dochelper.EscapedMatchTransformDefinition:

Inheritance graph
[legend]
Collaboration diagram for dochelper.EscapedMatchTransformDefinition:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EscapedMatchTransformDefinition (String text)
 Creates a new instance of EscapedMatchNodeDefinition.
String render (MatchResult result)
 This method recieves a result and applies its render definition.
String escapeText (String text)
 This Method escapes text passed in, generating a W3 DOM compliant result.
String getText ()
 This method gets the text template that this RenderDefinition should use in its render method.

Private Attributes

final String TEXT


Detailed Description

The class EscapedMatchNodeDefinition implements Render Definition to handle the rendering of matches that include characters that should be escaped when creating a DOM node.

Author:
Guillermo Christen

Definition at line 21 of file EscapedMatchTransformDefinition.java.


Constructor & Destructor Documentation

dochelper.EscapedMatchTransformDefinition.EscapedMatchTransformDefinition ( String  text  ) 

Creates a new instance of EscapedMatchNodeDefinition.

Parameters:
text 

Definition at line 28 of file EscapedMatchTransformDefinition.java.


Member Function Documentation

String dochelper.EscapedMatchTransformDefinition.render ( MatchResult  result  ) 

This method recieves a result and applies its render definition.

It performs a basic reg exp search and replace that uses the grouping attributes and behaviour found in the java.util.regex. MatchResultMatchResult result.

For each group found in the result param the method will search its TEXT variable for a substring composed of "\\$<groupNumber>" and replace it with the match result. Prior to performing the replace, the pertinent group text will be escaped by a call to escapeText.

Parameters:
result MatchResult that contains the matches that should be rendered by this class.
Returns:
String that contains the resulting output once the matches have been processed by this class.
See also:
java.util.regex.MatchResult

Implements dochelper.TransformDefinition.

Definition at line 51 of file EscapedMatchTransformDefinition.java.

Here is the call graph for this function:

String dochelper.EscapedMatchTransformDefinition.escapeText ( String  text  ) 

This Method escapes text passed in, generating a W3 DOM compliant result.

Parameters:
text String to escape
Returns:
String Escaped text.

Definition at line 80 of file EscapedMatchTransformDefinition.java.

Here is the caller graph for this function:

String dochelper.EscapedMatchTransformDefinition.getText (  ) 

This method gets the text template that this RenderDefinition should use in its render method.

Returns:
String RenderDefinition text template

Implements dochelper.TransformDefinition.

Definition at line 92 of file EscapedMatchTransformDefinition.java.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 23 of file EscapedMatchTransformDefinition.java.


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 14:22:02 2009 for DocHelper by  doxygen 1.5.6