com.ibm.dse.tools.workbench.tbg
Class TbgParser

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.tbg.TbgParser

public class TbgParser
extends java.lang.Object
implements TbgNames

This class implements the TBG Parser.


Field Summary
 TbgContext context
          The actual context.
 
Fields inherited from interface com.ibm.dse.tools.workbench.tbg.TbgNames
ATTRIB_LAST, ATTRIB_SEP, ATTRIBUTE, END_SIMPLE_TAG, END_TAG, INI_FINAL_TAG, INI_TAG, LITERAL, LITERAL_LAST1, LITERAL_LAST2, LITERAL_LAST3, LITERAL_SEP1, LITERAL_SEP2, LITERAL_SEP3
 
Constructor Summary
TbgParser()
          This constructor creates a com.ibm.dse.tools.workbench.tbg.TbgParser object.
 
Method Summary
 void generate(boolean include)
          Reads the template source line by line, looking for a TBG tag.
 void setContext(TbgContext aContext)
          Sets the context property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

public TbgContext context
The actual context.
Constructor Detail

TbgParser

public TbgParser()
This constructor creates a com.ibm.dse.tools.workbench.tbg.TbgParser object.
Method Detail

generate

public void generate(boolean include)
              throws TbgException,
                     WorkbenchException
Reads the template source line by line, looking for a TBG tag.

To execute this method, firstly some variables must be set. This variables could be set by excuting the generator with the API, with the methods open, start, close.

Parameters:
include - boolean Set to true if the generation comes from an include operation.
Throws:
TbgException - When errors or warnings have ocurred during the execution.
WorkbenchException - When errors have ocurred during the access to the DB or while writing or reading.

setContext

public void setContext(TbgContext aContext)
Sets the context property.
Parameters:
aContext - TbgContext The context to set.