com.g11ntoolkit.parser.java
Interface LTParserVisitor

All Superinterfaces:
JavaParserVisitor
All Known Implementing Classes:
LTTreeWalker

public interface LTParserVisitor
extends JavaParserVisitor

An extension to the JavaCC generated JavaParserVisitor to include some needed methods for the G11NToolKit Tree Walker.

Version:
2005/06/30
Author:
Bill Rich, Wilandra Consulting LLC
Copyright © 2004-2005, Wilandra Consulting LLC. All rights reserved.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See License Agreement.


Method Summary
 java.lang.String removeConcat(java.lang.String s)
          Removes string concatenation where possible.
 void setContextFileName(java.lang.String tc)
          Sets the Context File Name to be used by the Tree Walker.
 void setStrFile(StrFile sf)
          Sets the StrFile to be used by the Tree Walker
 void setTargetLocale(java.util.Locale tl)
          Sets the target locale to be used by the Tree Walker.
 void setTokenObject(Token tk)
          Sets the com.g11ntoolkit.token.Token object to be used by the Tree Walker.
 void setTokFile(TokFile tf)
          Sets the TokFile to be used by the Tree Walker.
 void writeXLIFF(java.io.OutputStreamWriter osw)
          Writes the tree walker results to an XLIFF format file.
 
Methods inherited from interface com.g11ntoolkit.parser.java.JavaParserVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 

Method Detail

setStrFile

public void setStrFile(StrFile sf)
Sets the StrFile to be used by the Tree Walker

Parameters:
sf - a StrFile specifying the StrFile object to be used

setTokFile

public void setTokFile(TokFile tf)
Sets the TokFile to be used by the Tree Walker.

Parameters:
tf - a TokFile specifying the TokFile object to be used

setContextFileName

public void setContextFileName(java.lang.String tc)
Sets the Context File Name to be used by the Tree Walker.

Parameters:
tc - a String specifying the file name to be used for the context of each extracted string

setTargetLocale

public void setTargetLocale(java.util.Locale tl)
Sets the target locale to be used by the Tree Walker.

Parameters:
tl - a Locale object specifying the target locale to be used for each extracted string

setTokenObject

public void setTokenObject(Token tk)
Sets the com.g11ntoolkit.token.Token object to be used by the Tree Walker.

Parameters:
tk - a com.g11ntoolkit.token.Token object specifying the token object to be used to generate the tokens for each extracted string

writeXLIFF

public void writeXLIFF(java.io.OutputStreamWriter osw)
Writes the tree walker results to an XLIFF format file.

Parameters:
osw - a OutputStreamWriter specifying the output stream writer to use

removeConcat

public java.lang.String removeConcat(java.lang.String s)
Removes string concatenation where possible.

Parameters:
s - a String specifying the string that has possible concatenation
Returns:
a String representing the input string with concatenation removed if possible