1 20 package org.objectweb.modfact.jmi.service.cmdline.xmiio; 21 22 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 23 24 27 public class OptionModel extends DefaultOptionBase { 28 29 32 protected XMIImportApplication application_; 33 34 38 public OptionModel(XMIImportApplication application) { 39 super(); 41 setLabels(new String [] { "-model" }); 42 setArguments(new String [] { "file" }); 43 setDescription(new String [] { "Set the XMI file to read" }); 44 setMandatory(true); 45 46 application_ = application; 48 } 49 50 54 58 public void consume(org.objectweb.util.cmdline.api.Iterator iterator) { 59 checkAlreadySet(iterator); 60 String file = consumeArgument(iterator); 61 application_.setModelFile(file); 62 } 63 64 } 65 | Popular Tags |