1 20 package org.objectweb.modfact.jmi.service; 21 22 23 public class GenerationService 24 extends org.objectweb.modfact.jmi.service.cmdline.xmiio.ImportApplication { 25 26 27 private String apiFile = null; 28 29 30 private String implFile = null; 31 32 33 private String importFile = null; 34 35 36 private String exportFile = null; 37 38 39 42 public GenerationService() { 43 super( 44 new org.objectweb.util.cmdline.lib.DefaultCommandLine( 45 new String [] { "GenerationService" }, 46 new String [0], 47 new String [] { "Tool to manage the MOF Repository" }, 48 true)); 49 getCommandLine().addOption( 51 new org.objectweb.modfact.jmi.service.cmdline.client.OptionApi(this)); 52 getCommandLine().addOption( 53 new org.objectweb.modfact.jmi.service.cmdline.client.OptionImpl(this)); 54 getCommandLine().addOption( 55 new org.objectweb.modfact.jmi.service.cmdline.client.OptionImport(this)); 56 getCommandLine().addOption( 57 new org.objectweb.modfact.jmi.service.cmdline.client.OptionExport(this)); 58 } 59 60 66 public int start(String [] args) { 67 try { 68 Generation client = new Generation(); 69 client.execute(metaModelFile, apiFile, implFile, importFile, exportFile); 70 return 0; 71 } catch (Exception ex) { 72 report_exception(ex); 73 return -1; 74 } 75 } 76 77 83 public static void main(String [] args) { 84 GenerationService application = new GenerationService(); 85 application.runMain(args); 86 } 87 88 89 93 public void setApiFile(String apiFile) { 94 this.apiFile = apiFile; 95 } 96 97 101 public void setExportFile(String exportFile) { 102 this.exportFile = exportFile; 103 } 104 105 109 public void setImplFile(String implFile) { 110 this.implFile = implFile; 111 } 112 113 117 public void setImportFile(String importFile) { 118 this.importFile = importFile; 119 } 120 121 } 122 123 124 | Popular Tags |