tribble.xml.schema
Class XmlSchema

java.lang.Object
  extended bytribble.xml.schema.XmlSchema

public abstract class XmlSchema
extends java.lang.Object

Methods to convert a Java class to an XML/Schema document.

Since:
2003-07-11
Version:
$Revision: 1.1 $ $Date: 2003/07/12 15:50:48 $
Author:
David R. Tribble (david@tribble.com)
Copyright ©2003 by David R. Tribble, all rights reserved.

PROPRIETARY SOURCE CODE, RESTRICTED TO USE UNDER LICENSE.

Method Summary
static void classToXmlSchema(java.lang.Class cl, java.io.Writer out)
          Convert a Java class into its corresponding XML/Schema definition.
static void main(java.lang.String[] args)
          Convert a Java class into its corresponding XML/Schema definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Convert a Java class into its corresponding XML/Schema definition.

Usage

 java tribble.xml.schema.XmlSchema pkg.class 

Loads the class named pkg.class (which should be located somewhere in the CLASSPATH), and writes its structure as an XML/Schema document to the standard output.

Parameters:
args - Command line arguments.
Throws:
java.io.IOException - Thrown if an I/O (write) error occurs.
java.lang.ClassNotFoundException - Thrown if an I/O (write) error occurs.
Since:
1.1, 2003-07-12

classToXmlSchema

public static void classToXmlSchema(java.lang.Class cl,
                                    java.io.Writer out)
                             throws java.io.IOException
Convert a Java class into its corresponding XML/Schema definition.

Parameters:
cl - Java class to convert.
out - Output stream to write the XML/Schema definition to.
Throws:
java.io.IOException - Thrown if an I/O (write) error occurs.
java.lang.IllegalArgumentException - (unchecked) Thrown if cl cannot be mapped as XML.
java.lang.NullPointerException - (unchecked) Thrown if cl is null.
Since:
1.1, 2003-07-11