com.g11ntoolkit.tokfile
Class XMLParseTokFile

java.lang.Object
  |
  +--com.g11ntoolkit.tokfile.XMLParseTokFile

public class XMLParseTokFile
extends java.lang.Object

Takes a TokFile in XML format and parses it.

Version:
2005/06/20
Author:
Bill Rich, Wilandra Consulting LLC
Copyright © 2002-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.
protected static java.util.ResourceBundle mrb
          Messages used by the tools and classes.
protected static java.util.ResourceBundle vrb
          Constants and variables used by the tools and classes.
 
Constructor Summary
XMLParseTokFile()
          Create an instance of the XMLParseTokFile tool.
 
Method Summary
private static java.lang.String convertToFileURL(java.lang.String filename)
          Returns the filename converted to a file URL.
static void main(java.lang.String[] argv)
          Provides a command line entry point.
static void run(java.lang.String theFile, java.lang.String outFile, boolean setValidation, boolean setNameSpaces)
          Parse a TokFile in XML format and write a TokFile in text format.
 
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

protected static java.util.ResourceBundle mrb
Messages used by the tools and classes.


vrb

protected static java.util.ResourceBundle vrb
Constants and variables used by the tools and classes.

Constructor Detail

XMLParseTokFile

public XMLParseTokFile()
Create an instance of the XMLParseTokFile tool.

Method Detail

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Provides a command line entry point.

Parameters:
argv - a String the specified arguments from the command line
Throws:
java.lang.Exception - for any errors encountered

run

public static void run(java.lang.String theFile,
                       java.lang.String outFile,
                       boolean setValidation,
                       boolean setNameSpaces)
                throws java.lang.Exception
Parse a TokFile in XML format and write a TokFile in text format.

Parameters:
theFile - a String specifying the name of the file to parse
outFile - a String specifying the name of the output file
setValidation - a boolean specifying whether the user wants validation of the XML DTD (TRUE) or not (FALSE)
setNameSpaces - a boolean specifying whether the user wants the process to be Names Space aware (TRUE) or not (FALSE)
Throws:
java.lang.Exception - description if anything goes wrong

convertToFileURL

private static java.lang.String convertToFileURL(java.lang.String filename)
Returns the filename converted to a file URL.

Parameters:
filename - a String containing the file name to be converted
Returns:
String containing the converted file name