KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > modfact > jmi > service > cmdline > xmiio > XMIImportApplication


1 /**
2  * copyright 2002 2004 Laboratoire d'Informatique Paris 6 (LIP6)
3  *
4  * This file is part of ModFact.
5  *
6  * ModFact is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * at your option) any later version.
10  *
11  * ModFact is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with ModFact; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */

20 package org.objectweb.modfact.jmi.service.cmdline.xmiio;
21
22
23 /**
24  * An abstract implementation of an XMI Import application.
25  * This class provides methods for all XMI importers.
26  */

27 public abstract class XMIImportApplication
28     extends ImportApplication {
29
30     
31     /** The XMI model file. */
32     protected String JavaDoc modelFile_ = new String JavaDoc();
33
34
35     /**
36      * XMIImportApplication constructor.
37      * @param package_name The package name.
38      * @param class_name The class name.
39      * @param default_ior_file The default IOR file.
40      */

41     protected XMIImportApplication(String JavaDoc package_name, String JavaDoc class_name, String JavaDoc default_ior_file) {
42         this(new org.objectweb.util.cmdline.lib.DefaultCommandLine(new String JavaDoc[] { class_name }, new String JavaDoc[0], new String JavaDoc[] { "Import an XMI file for the model " + package_name + "." }, true));
43     }
44
45     /**
46      * XMIImportApplication constructor.
47      * @param commandLine The command line manager.
48      */

49     private XMIImportApplication(org.objectweb.util.cmdline.lib.DefaultCommandLine commandLine) {
50         super(commandLine);
51         // Creates the XMIImportApplication options
52
commandLine.addOption(new OptionModel(this));
53     }
54
55     /**
56      * Set the input file.
57      * @param filename The input filename.
58      */

59     public void setModelFile(String JavaDoc filename) {
60         modelFile_ = filename;
61     }
62
63 }
64
Popular Tags