dochelper
Class TransformDefinitionImpl

java.lang.Object
  extended by dochelper.TransformDefinitionImpl
All Implemented Interfaces:
TransformDefinition
Direct Known Subclasses:
XINSCAPIPatternTransform

public class TransformDefinitionImpl
extends java.lang.Object
implements TransformDefinition

The class RenderDefinitionImpl implements the RenderDefinition interface and is used as the simplest manner in which to render DocPattern matches.


Field Summary
private  java.lang.String TEXT
           
 
Constructor Summary
TransformDefinitionImpl(java.lang.String text)
          Creates a new instance of NodeDefinitionImpl
 
Method Summary
 java.lang.String getText()
          Retrieves the String template that will be used to render the matches.
 java.lang.String render(java.util.regex.MatchResult result)
          Main method of RenderDefinition class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT

private final java.lang.String TEXT
Constructor Detail

TransformDefinitionImpl

public TransformDefinitionImpl(java.lang.String text)
Creates a new instance of NodeDefinitionImpl

Parameters:
text -
Method Detail

render

public java.lang.String render(java.util.regex.MatchResult result)
Main method of RenderDefinition class. This method is called to create the output content given a set of matches for a particular regular expression. Once a DocPattern is executed, if it finds a set of matches (within the contents of the record) it will call the RenderDefinition associated with it, to render the matches.

Specified by:
render in interface TransformDefinition
Parameters:
result - java.util.regex.MatchResult that contains the match results for a regular expression. It contains the whole match and separate groups.
Returns:
String containing the render result.

getText

public java.lang.String getText()
Retrieves the String template that will be used to render the matches.

Specified by:
getText in interface TransformDefinition
Returns:
String containing template to be used to render matches.