fr.tireme.schemadoc.xs2dtd
Class Prototype

java.lang.Object
  extended by fr.tireme.schemadoc.xs2dtd.Prototype

public class Prototype
extends java.lang.Object

The main class of the XS2DTD prototype, which loads a .xsd SDSchema file and builds the DTDHandler XML file.

Author:
lorent

Field Summary
static boolean debug
           
 
Constructor Summary
Prototype(java.lang.String filename_, java.lang.String outputDir_)
          Constructor.
Prototype(java.lang.String filename_, java.lang.String outputDir_, boolean useNamespaces_)
          Constructor.
Prototype(java.lang.String filename_, java.lang.String outputDir_, boolean useNamespaces_, boolean doGenerateDTDHandlerXMLFile_)
          Constructor.
Prototype(java.lang.String filename_, java.lang.String outputDir_, boolean useNamespaces_, boolean doGenerateDTDHandlerXMLFile_, boolean doNormalizeNames_)
          Constructor.
Prototype(java.lang.String filename, java.lang.String outputDir, boolean useNamespaces, boolean doGenerateDTDHandlerXMLFile, boolean doNormalizeNames, boolean useLocalxs2DTDHandler)
          Generix constructor.
Prototype(java.lang.String filename, java.lang.String outputDir, boolean useNamespaces, boolean doGenerateDTDHandlerXMLFile, boolean doNormalizeNames, boolean useLocalxs2DTDHandler, java.util.Locale locale)
          Generix constructor.
Prototype(java.lang.String filename, java.lang.String outputDir, boolean useNamespaces, boolean doGenerateDTDHandlerXMLFile, boolean doNormalizeNames, boolean useLocalxs2DTDHandler, java.util.Locale locale, boolean debug_)
          Generix constructor.
 
Method Summary
static java.lang.String calcOutputDirectory(java.io.File file_, java.lang.String outputPropal)
          Guess the output file directory of DTD files
static java.lang.String getHomeDirectory()
          Loads the XS2DTD home directory
 void go()
          Run the conversion
static void init()
          Init the configuration, locale & log system management
static void main(java.lang.String[] args)
          The main program for the Prototype class
 void setHandler(java.util.logging.Handler hand)
          Overwrite standard file logging
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

Prototype

public Prototype(java.lang.String filename_,
                 java.lang.String outputDir_)
          throws java.lang.Exception
Constructor. Want to normalize PE and use namspace in object names are read from config file.

Parameters:
filename_ - input schema file path
outputDir_ - output directory if needed (or null)
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename_,
                 java.lang.String outputDir_,
                 boolean useNamespaces_)
          throws java.lang.Exception
Constructor. Want to normalize PE is read from config file.

Parameters:
filename_ - input schema file path
outputDir_ - output directory if needed (or null)
useNamespaces_ - want to use namesapce management in the output
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename_,
                 java.lang.String outputDir_,
                 boolean useNamespaces_,
                 boolean doGenerateDTDHandlerXMLFile_)
          throws java.lang.Exception
Constructor. Want to normalize PE is read from config file.

Parameters:
filename_ - input schema file path
outputDir_ - output directory if needed (or null)
useNamespaces_ - want to use namesapce management in the output
doGenerateDTDHandlerXMLFile_ - want a dump of the intermediate handler file ?
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename_,
                 java.lang.String outputDir_,
                 boolean useNamespaces_,
                 boolean doGenerateDTDHandlerXMLFile_,
                 boolean doNormalizeNames_)
          throws java.lang.Exception
Constructor. Want to normalize PE is read from config file.

Parameters:
filename_ - input schema file path
outputDir_ - output directory if needed (or null)
useNamespaces_ - want to use namesapce management in the output
doGenerateDTDHandlerXMLFile_ - want a dump of the intermediate handler file ?
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename,
                 java.lang.String outputDir,
                 boolean useNamespaces,
                 boolean doGenerateDTDHandlerXMLFile,
                 boolean doNormalizeNames,
                 boolean useLocalxs2DTDHandler)
          throws java.lang.Exception
Generix constructor.

Parameters:
filename - input schema file path
outputDir - output directory if needed (or null)
useNamespaces - want to use namesapce management in the output
doNormalizeNames - want to normalize PE
doGenerateDTDHandlerXMLFile - want a dump of the intermediate handler file ?
useLocalxs2DTDHandler - want to use the local xs2DTDHandler schema model
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename,
                 java.lang.String outputDir,
                 boolean useNamespaces,
                 boolean doGenerateDTDHandlerXMLFile,
                 boolean doNormalizeNames,
                 boolean useLocalxs2DTDHandler,
                 java.util.Locale locale)
          throws java.lang.Exception
Generix constructor.

Parameters:
filename - input schema file path
outputDir - output directory if needed (or null)
useNamespaces - want to use namesapce management in the output
doNormalizeNames - want to normalize PE
doGenerateDTDHandlerXMLFile - want a dump of the intermediate handler file ?
useLocalxs2DTDHandler - want to use the local xs2DTDHandler schema model
locale -
Throws:
java.lang.Exception

Prototype

public Prototype(java.lang.String filename,
                 java.lang.String outputDir,
                 boolean useNamespaces,
                 boolean doGenerateDTDHandlerXMLFile,
                 boolean doNormalizeNames,
                 boolean useLocalxs2DTDHandler,
                 java.util.Locale locale,
                 boolean debug_)
          throws java.lang.Exception
Generix constructor.

Parameters:
filename - input schema file path
outputDir - output directory if needed (or null)
useNamespaces - want to use namesapce management in the output
doNormalizeNames - want to normalize PE
doGenerateDTDHandlerXMLFile - want a dump of the intermediate handler file ?
useLocalxs2DTDHandler - want to use the local xs2DTDHandler schema model
locale -
Throws:
java.lang.Exception
Method Detail

main

public static void main(java.lang.String[] args)
The main program for the Prototype class

Parameters:
args - - The first argument must be a .xsd file to load.

setHandler

public void setHandler(java.util.logging.Handler hand)
Overwrite standard file logging

Parameters:
hand - the logging handler.

go

public void go()
        throws java.lang.Exception
Run the conversion

Throws:
java.lang.Exception

calcOutputDirectory

public static java.lang.String calcOutputDirectory(java.io.File file_,
                                                   java.lang.String outputPropal)
                                            throws Xs2dtdException
Guess the output file directory of DTD files

Parameters:
file_ - - input xsd source file
outputPropal - - given output directory or null if none
Returns:
String - calculated output directory path
Throws:
Xs2dtdException

init

public static void init()
                 throws java.lang.Exception
Init the configuration, locale & log system management

Throws:
- - Exception
java.lang.Exception

getHomeDirectory

public static java.lang.String getHomeDirectory()
                                         throws java.lang.Exception
Loads the XS2DTD home directory

Returns:
String
Throws:
- - Exception
java.lang.Exception