1 20 package org.objectweb.modfact.corba.xmiio.importer; 21 22 import org.objectweb.modfact.corba.service.cmdline.common.ModfactApplicationBase; 23 import org.objectweb.modfact.corba.service.cmdline.io.OptionInput; 24 import org.objectweb.modfact.corba.service.cmdline.xmiio.OptionIORFile; 25 import org.objectweb.modfact.corba.service.cmdline.xmiio.OptionNameService; 26 import org.objectweb.modfact.corba.service.cmdline.xmiio.OptionPrintIOR; 27 import org.objectweb.modfact.corba.service.cmdline.xmiio.XMIImportApplication; 28 29 33 public abstract class AbstractXMIImportApplication 34 extends ModfactApplicationBase 35 implements XMIImportApplication { 36 37 38 protected boolean printIOR_ = false; 39 40 41 protected String iorFile_ = new String (); 42 43 44 protected String inputFile_ = new String (); 45 46 47 protected String nameService_ = new String (); 48 49 55 protected AbstractXMIImportApplication(String package_name, String class_name, String default_ior_file) { 56 this(new org.objectweb.util.cmdline.lib.DefaultCommandLine(new String [] { class_name }, new String [0], new String [] { "Import an XMI file for the model " + package_name + "." }, true)); 57 setIORFile(default_ior_file); 58 } 59 60 64 private AbstractXMIImportApplication(org.objectweb.util.cmdline.lib.DefaultCommandLine commandLine) { 65 super(commandLine); 66 commandLine.addOption(new OptionInput(this)); 68 commandLine.addOption(new OptionIORFile(this)); 69 commandLine.addOption(new OptionPrintIOR(this)); 70 commandLine.addOption(new OptionNameService(this)); 71 } 72 73 77 public void setIORFile(String filename) { 78 iorFile_ = filename; 79 } 80 81 85 public void setInputFile(String filename) { 86 inputFile_ = filename; 87 } 88 89 93 public void setPrintIOR(boolean print) { 94 printIOR_ = print; 95 } 96 97 101 public void setNameService(String nameService) { 102 nameService_ = nameService; 103 } 104 105 } 106 | Popular Tags |