com.g11ntoolkit.detokenizer
Class DetokXMLFile

java.lang.Object
  |
  +--com.g11ntoolkit.detokenizer.DetokXMLFile

public class DetokXMLFile
extends java.lang.Object

Replaces all the token identifiers in the specified tokenized resource bundle file with the strings taken from the specified string file.

Writes out the specified output file when finished replacing the tokens.

Version:
2005/07/22
Author:
Bill Rich, Wilandra Consulting LLC
Copyright © 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.


Field Summary
private static java.util.logging.Logger log
          The log used for all messages from this class.
private static java.util.ResourceBundle mrb
          Message Resource Bundle.
private static java.util.ResourceBundle vrb
          Variables Resource Bundle.
 
Constructor Summary
DetokXMLFile()
           
 
Method Summary
static void detokenize(java.lang.String strFileName, java.lang.String outFileName, java.lang.String contextFileName, java.lang.String encoding, java.util.Locale targetLocale)
          Finds and replaces the tokens with their strings.
static void main(java.lang.String[] args)
          Allows this tool to be run from the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log
The log used for all messages from this class.


mrb

private static java.util.ResourceBundle mrb
Message Resource Bundle.


vrb

private static java.util.ResourceBundle vrb
Variables Resource Bundle.

Constructor Detail

DetokXMLFile

public DetokXMLFile()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws DetokRunError
Allows this tool to be run from the command line.

Sets up the environment then calls the detokenize method to do the work.

Parameters:
args - a String containing the command line parameters.
DetokRunError

detokenize

public static void detokenize(java.lang.String strFileName,
                              java.lang.String outFileName,
                              java.lang.String contextFileName,
                              java.lang.String encoding,
                              java.util.Locale targetLocale)
                       throws DetokRunError
Finds and replaces the tokens with their strings.

This method begins from an XLIFF format StrFile.

Parameters:
strFileName - a String containing the name of the input StrFile
outFileName - a String containing the name of the output file
contextFileName - a String containing the name of the file to be used as the context file name
encoding - a String containing the code identifying how the output file should be encoded. This must be a valid encoding code.
targetLocale - a Locale for the desired target locale.
Throws:
DetokRunError - for any error detected during the processing.