jgb
Class BuildWindowFromXmlFile

java.lang.Object
  |
  +--jgb.BuildWindowFromXmlFile

public class BuildWindowFromXmlFile
extends Object

Builds a window from an XML file.

This tool may be used to view an XML file using the current implementation.

Usage

Simply run the following:

 java jgb.BuildWindowFromXmlFile path/to/xml-file
 

Optional options are as follows:

--verbose
-v
Asks the Builder to be verbose.
--quiet
-q
Asks the Builder to be quiet.
--show
Asks the JGB framework to pack and show the window after it is read.

Since:
0.1a
Author:
Francois Beausoleil, fbos@users.sourceforge.net

Constructor Summary
BuildWindowFromXmlFile()
           
 
Method Summary
static void main(String[] args)
          Builds a window from the file passed as the first argument.
 void printUsage(PrintWriter out, jgb.InvalidParameterException exception)
           
 String processArguments(jgb.builder.Builder builder, List args)
          Reads and processes each argument on the command line.
 Component start(jgb.builder.Builder b, org.xml.sax.InputSource in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildWindowFromXmlFile

public BuildWindowFromXmlFile()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Builds a window from the file passed as the first argument.

Parameters:
args - The arguments as received from the command-line.
Throws:
Exception - If an exception is thrown while building the window.

printUsage

public void printUsage(PrintWriter out,
                       jgb.InvalidParameterException exception)

processArguments

public String processArguments(jgb.builder.Builder builder,
                               List args)
                        throws InvalidParameterException,
                               FileNotFoundException
Reads and processes each argument on the command line.

Parameters:
builder - The builder which will have its options set according to the options set on the command line.
args - The list of arguments as received from the command-line. The list will in no way be modified by this method.
Returns:
The absolute path to the last argument (filename).
Throws:
RequiredArgumentMissingException - if the filename argument is missing from the command line.
UnknownArgumentException - if an argument cannot be processed because it is not a filename.
FileNotFoundException - if the filename argument cannot be found on disk.
TooManyArgumentsException - if there are more than one filename arguments on the command line.
InvalidParameterException

start

public Component start(jgb.builder.Builder b,
                       org.xml.sax.InputSource in)
                throws IOException,
                       org.xml.sax.SAXException
IOException
org.xml.sax.SAXException


Copyright 2002-2003, François Beausoleil, All Rights Reserved