KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > zeus > util > ZeusCommand


1 /*
2  * Enhydra Java Application Server
3  * The Initial Developer of the Original Code is Lutris Technologies Inc.
4  * Portions created by Lutris are Copyright (C) 1997-2000 Lutris Technologies
5  * Inc.
6  * All Rights Reserved.
7  *
8  * The contents of this file are subject to the Enhydra Public License Version
9  * 1.0 (the "License"); you may not use this file except in compliance with the
10  * License. You may obtain a copy of the License at
11  * http://www.enhydra.org/software/license/epl.html
12  *
13  * Software distributed under the License is distributed on an "AS IS" basis,
14  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
15  * License for the specific language governing rights and limitations under the
16  * License.
17  *-----------------------------------------------------------------------------
18  * $Id: ZeusCommand.java,v 1.4 2002/08/16 21:28:29 cney Exp $
19  *-----------------------------------------------------------------------------
20  */

21
22 package org.enhydra.zeus.util;
23
24
25 /**
26  * Created on Aug 15, 2002
27  * Main class for zeus shell command
28  * @author Christophe Ney - cney@batisseurs.com
29  */

30 public class ZeusCommand {
31
32     private static final String JavaDoc command = "zeus";
33
34     /**
35      * <p>
36      * This provides command-line class generation.
37      * </p>
38      *
39      * @param args <code>String</code> array of command-line arguments.
40      */

41     public static void main(String JavaDoc[] args) {
42         Arguments arguments = new Arguments(args);
43
44         // Ensure correct usage
45
String JavaDoc constraintsFilename =
46                 arguments.getValue("constraints");
47
48         if (constraintsFilename != null) {
49             if (constraintsFilename.toLowerCase().endsWith(".dtd")) {
50                 DTDSourceGenerator.main(args);
51                 return;
52             }
53             if (constraintsFilename.toLowerCase().endsWith(".xsd")) {
54                 XSDSourceGenerator.main(args);
55                 return;
56             }
57         }
58         System.out.println("Usage: " + command +
59                 " -constraints=<filename.xsd|filename.dtd>" +
60                 " [-outputDir=<output directory>" +
61                 " [-collapseSimpleElements=" +
62                 "<true | false>]" +
63                 " [-ignoreIDAttributes=<true | false>]" +
64                 " [-javaPackage=<Java package name>]");
65     }
66 }
67
Popular Tags