plugins/base2/uk.ac.scri.batchimporter/trunk/src/sbrn/base/BatchDataImporter.java

Code
Comments
Other
Rev Date Author Line
226 09 Jan 07 mbayer 1 /*
226 09 Jan 07 mbayer 2 Copyright (C) Authors contributing to this file. 
226 09 Jan 07 mbayer 3
226 09 Jan 07 mbayer 4 This program is free software; you can redistribute it and/or modify
226 09 Jan 07 mbayer 5 it under the terms of the GNU General Public License as published by
226 09 Jan 07 mbayer 6 the Free Software Foundation; either version 2 of the License, or
226 09 Jan 07 mbayer 7 (at your option) any later version.
226 09 Jan 07 mbayer 8
226 09 Jan 07 mbayer 9 This program is distributed in the hope that it will be useful,
226 09 Jan 07 mbayer 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
226 09 Jan 07 mbayer 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226 09 Jan 07 mbayer 12 GNU General Public License for more details.
226 09 Jan 07 mbayer 13
226 09 Jan 07 mbayer 14 You should have received a copy of the GNU General Public License along
226 09 Jan 07 mbayer 15 with this program; if not, write to the Free Software Foundation, Inc.,
226 09 Jan 07 mbayer 16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
226 09 Jan 07 mbayer 17
226 09 Jan 07 mbayer 18 See also http://www.gnu.org/licenses/gpl.txt. 
226 09 Jan 07 mbayer 19 */
226 09 Jan 07 mbayer 20 package sbrn.base;
226 09 Jan 07 mbayer 21
226 09 Jan 07 mbayer 22 import net.sf.basedb.core.BaseException;
226 09 Jan 07 mbayer 23 import net.sf.basedb.core.BooleanParameterType;
226 09 Jan 07 mbayer 24 import net.sf.basedb.core.DbControl;
226 09 Jan 07 mbayer 25 import net.sf.basedb.core.Experiment;
226 09 Jan 07 mbayer 26 import net.sf.basedb.core.File;
226 09 Jan 07 mbayer 27 import net.sf.basedb.core.FileParameterType;
226 09 Jan 07 mbayer 28 import net.sf.basedb.core.Item;
226 09 Jan 07 mbayer 29 import net.sf.basedb.core.ItemParameterType;
226 09 Jan 07 mbayer 30 import net.sf.basedb.core.Job;
226 09 Jan 07 mbayer 31 import net.sf.basedb.core.PluginParameter;
226 09 Jan 07 mbayer 32 import net.sf.basedb.core.ProgressReporter;
226 09 Jan 07 mbayer 33 import net.sf.basedb.core.RawBioAssay;
226 09 Jan 07 mbayer 34 import net.sf.basedb.core.RequestInformation;
226 09 Jan 07 mbayer 35 import net.sf.basedb.core.plugin.About;
226 09 Jan 07 mbayer 36 import net.sf.basedb.core.plugin.AboutImpl;
226 09 Jan 07 mbayer 37 import net.sf.basedb.core.plugin.AbstractPlugin;
226 09 Jan 07 mbayer 38 import net.sf.basedb.core.plugin.AutoDetectingImporter;
226 09 Jan 07 mbayer 39 import net.sf.basedb.core.plugin.GuiContext;
226 09 Jan 07 mbayer 40 import net.sf.basedb.core.plugin.InteractivePlugin;
226 09 Jan 07 mbayer 41 import net.sf.basedb.core.plugin.Plugin;
226 09 Jan 07 mbayer 42 import net.sf.basedb.core.plugin.Request;
226 09 Jan 07 mbayer 43 import net.sf.basedb.core.plugin.Response;
226 09 Jan 07 mbayer 44
226 09 Jan 07 mbayer 45 import java.io.InputStream;
226 09 Jan 07 mbayer 46 import java.util.ArrayList;
226 09 Jan 07 mbayer 47 import java.util.Arrays;
226 09 Jan 07 mbayer 48 import java.util.Collections;
226 09 Jan 07 mbayer 49 import java.util.List;
226 09 Jan 07 mbayer 50 import java.util.Set;
226 09 Jan 07 mbayer 51 import java.util.zip.ZipEntry;
226 09 Jan 07 mbayer 52 import java.util.zip.ZipInputStream;
226 09 Jan 07 mbayer 53
226 09 Jan 07 mbayer 54 /**
226 09 Jan 07 mbayer 55   This plugin imports a batch of individual data files into an experiment chosen by the user. It is set up to be invoked 
226 09 Jan 07 mbayer 56   from the detail view of a single Experiment where an import tab lets the user select a zip file that contains all the 
226 09 Jan 07 mbayer 57   data files. On invocation it proceeds to create a new subdirectory in the user's raw data directory -- this subdirectory
226 09 Jan 07 mbayer 58   is named after the zip file minus the extension plus a timestamp in the format ddMMyy_hhmmss. The zip file is 
226 09 Jan 07 mbayer 59   unzipped into this directory. For each file in the directory, a single RawBioAssay object is then created, and once 
226 09 Jan 07 mbayer 60   all the data files have been processed in this way, the RawBioAssay objects just created are attached to the Experiment 
226 09 Jan 07 mbayer 61   where the import is run from. 
226 09 Jan 07 mbayer 62   
226 09 Jan 07 mbayer 63   It is assumed that all the data files are of the same data type and all adhere strictly to the same format -- the import
226 09 Jan 07 mbayer 64   will fail otherwise. It is also assumed that a suitable import config for the data exists. 
226 09 Jan 07 mbayer 65   
226 09 Jan 07 mbayer 66   This is an initial prototype and does not support annotation features or creation of any other items. 
226 09 Jan 07 mbayer 67   
226 09 Jan 07 mbayer 68  @author Micha Bayer - Plant Bioinformatics Group, Scottish Crop Research Institute
226 09 Jan 07 mbayer 69   email: sbrn@scri.ac.uk, web http://www.scri.ac.uk
226 09 Jan 07 mbayer 70  */
226 09 Jan 07 mbayer 71 public class BatchDataImporter extends AbstractPlugin implements InteractivePlugin, AutoDetectingImporter
226 09 Jan 07 mbayer 72 {
226 09 Jan 07 mbayer 73
226 09 Jan 07 mbayer 74 //  ========================================variables===================================  
226 09 Jan 07 mbayer 75
226 09 Jan 07 mbayer 76   //current version
226 09 Jan 07 mbayer 77   private static final String version = "0.1";
226 09 Jan 07 mbayer 78
226 09 Jan 07 mbayer 79   //the context that this plugin will be invoked from
226 09 Jan 07 mbayer 80   //currently set to provide the user with an "import" tab when they view a single experiment's details
226 09 Jan 07 mbayer 81   private static final Set<GuiContext> guiContexts = Collections.singleton(new GuiContext(Item.EXPERIMENT, 
226 09 Jan 07 mbayer 82           GuiContext.Type.ITEM));
226 09 Jan 07 mbayer 83
226 09 Jan 07 mbayer 84   // The complete request information
226 09 Jan 07 mbayer 85   private RequestInformation configureJob;
226 09 Jan 07 mbayer 86
226 09 Jan 07 mbayer 87   // The parameter that asks for a file to import from
226 09 Jan 07 mbayer 88   private PluginParameter<File> fileParameter;
226 09 Jan 07 mbayer 89
226 09 Jan 07 mbayer 90   // The parameter that asks if existing items should be updated or not
226 09 Jan 07 mbayer 91   private PluginParameter<Boolean> updateExistingParameter;
226 09 Jan 07 mbayer 92
226 09 Jan 07 mbayer 93   //dbcontrol object
226 09 Jan 07 mbayer 94   private DbControl dc;
226 09 Jan 07 mbayer 95
226 09 Jan 07 mbayer 96   //this is info about the plugin that is visible on the Definitions page
226 09 Jan 07 mbayer 97   private static final About about = new AboutImpl("Batch Data Importer", 
226 09 Jan 07 mbayer 98           "Imports batches of data files into BASE, creating a single RawbioAssay for each file", 
226 09 Jan 07 mbayer 99           version, 
226 09 Jan 07 mbayer 100           "2006, Scottish Crop Research Institute",
226 09 Jan 07 mbayer 101           "Micha Bayer",
226 09 Jan 07 mbayer 102           "mbayer@scri.ac.uk", 
226 09 Jan 07 mbayer 103           "http://www.scri.ac.uk"
226 09 Jan 07 mbayer 104           );
226 09 Jan 07 mbayer 105   
226 09 Jan 07 mbayer 106   //the Experiment item we want to attach the data to, packaged as a parameter to the plugin
226 09 Jan 07 mbayer 107   private PluginParameter<Experiment> experimentParameter;
226 09 Jan 07 mbayer 108   
226 09 Jan 07 mbayer 109   //the Experiment item we want to attach the data to
226 09 Jan 07 mbayer 110   private Experiment experiment;
226 09 Jan 07 mbayer 111
226 09 Jan 07 mbayer 112 //  ========================================methods===================================    
226 09 Jan 07 mbayer 113
226 09 Jan 07 mbayer 114   /**
226 09 Jan 07 mbayer 115    Called when the plugin is to execute. This is where the actual import is initiated from. The class
226 09 Jan 07 mbayer 116    that actually does most of the work is BatchDataImport.java. 
226 09 Jan 07 mbayer 117    */
226 09 Jan 07 mbayer 118   public void run(Request request, Response response, ProgressReporter progress)
226 09 Jan 07 mbayer 119   {
226 09 Jan 07 mbayer 120     // Open a connection to the database
226 09 Jan 07 mbayer 121     // sc is set by init() method
226 09 Jan 07 mbayer 122     dc = sc.newDbControl();
226 09 Jan 07 mbayer 123     try
226 09 Jan 07 mbayer 124     {
226 09 Jan 07 mbayer 125       //get the Experiment object that this import pertains to 
226 09 Jan 07 mbayer 126       experiment = (Experiment)job.getValue("experiment");
226 09 Jan 07 mbayer 127       dc.reattachItem(experiment);
226 09 Jan 07 mbayer 128       System.out.println("experiment: " + experiment);
226 09 Jan 07 mbayer 129       
226 09 Jan 07 mbayer 130       //get the file selected by the user
226 09 Jan 07 mbayer 131       File file = (File) job.getValue("file");
226 09 Jan 07 mbayer 132       file = File.getById(dc, file.getId());
226 09 Jan 07 mbayer 133       System.out.println("file selected: " + file.getName());
226 09 Jan 07 mbayer 134
226 09 Jan 07 mbayer 135       //do the import
226 09 Jan 07 mbayer 136       BatchDataImport batchDataImport = new BatchDataImport(sc,file,experiment,progress);
226 09 Jan 07 mbayer 137       boolean importSuccess = batchDataImport.importData();
226 09 Jan 07 mbayer 138
230 14 Feb 07 mbayer 139       //set the success message if appropriate
226 09 Jan 07 mbayer 140       if(importSuccess)
226 09 Jan 07 mbayer 141         response.setDone("Plugin ended successfully");
230 14 Feb 07 mbayer 142
226 09 Jan 07 mbayer 143     }
226 09 Jan 07 mbayer 144     catch (Throwable t)
226 09 Jan 07 mbayer 145     {
230 14 Feb 07 mbayer 146       // All exceptions must be caught and sent back 
226 09 Jan 07 mbayer 147       // using the response object
226 09 Jan 07 mbayer 148       response.setError(t.getMessage(), Arrays.asList(t));
230 14 Feb 07 mbayer 149       response.setDone("Plugin failed: " + t.getMessage());
226 09 Jan 07 mbayer 150     }
226 09 Jan 07 mbayer 151     finally
226 09 Jan 07 mbayer 152     {
230 14 Feb 07 mbayer 153
226 09 Jan 07 mbayer 154       // IMPORTANT!!! Make sure opened connections are closed
226 09 Jan 07 mbayer 155       if (dc != null)
226 09 Jan 07 mbayer 156         dc.close();
226 09 Jan 07 mbayer 157     }
226 09 Jan 07 mbayer 158   }
226 09 Jan 07 mbayer 159
226 09 Jan 07 mbayer 160
226 09 Jan 07 mbayer 161 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 162
226 09 Jan 07 mbayer 163   /**
226 09 Jan 07 mbayer 164   Checks whether a file is importable. In our case this consists of getting a zip inputstream to the file in question
226 09 Jan 07 mbayer 165    and trying to read from it.
226 09 Jan 07 mbayer 166    @param InputStream in - the input stream from the (zip) file the user specified for import
226 09 Jan 07 mbayer 167    @return boolean -- false if the file is not a zip file
226 09 Jan 07 mbayer 168    */
226 09 Jan 07 mbayer 169   public boolean isImportable(InputStream in) throws BaseException
226 09 Jan 07 mbayer 170   {
226 09 Jan 07 mbayer 171     try
226 09 Jan 07 mbayer 172     {
226 09 Jan 07 mbayer 173       System.out.println("=====================================");
226 09 Jan 07 mbayer 174       System.out.println("===========NEW BATCH IMPORT =========");
226 09 Jan 07 mbayer 175       System.out.println("=====================================");
226 09 Jan 07 mbayer 176
226 09 Jan 07 mbayer 177       //check whether the file is actually a zip file      
226 09 Jan 07 mbayer 178       ZipInputStream zin = new ZipInputStream(in);
226 09 Jan 07 mbayer 179       //if this is not a zip file, this will throw an exception:
226 09 Jan 07 mbayer 180       ZipEntry zn = zin.getNextEntry();
226 09 Jan 07 mbayer 181       System.out.println("zn =" + zn.getName());
226 09 Jan 07 mbayer 182     }
226 09 Jan 07 mbayer 183     catch (Exception e)
226 09 Jan 07 mbayer 184     {
226 09 Jan 07 mbayer 185       // TODO Auto-generated catch block
226 09 Jan 07 mbayer 186       System.out.println("file is not a zip file");
226 09 Jan 07 mbayer 187       e.printStackTrace();
226 09 Jan 07 mbayer 188       return false;
226 09 Jan 07 mbayer 189     }
226 09 Jan 07 mbayer 190
226 09 Jan 07 mbayer 191     return true;
226 09 Jan 07 mbayer 192   }
226 09 Jan 07 mbayer 193
226 09 Jan 07 mbayer 194 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 195
226 09 Jan 07 mbayer 196   /**
226 09 Jan 07 mbayer 197   Indicates whether the plugin can be configured by means of PluginConfigurations; false in our case because
226 09 Jan 07 mbayer 198    all this plugin ever does is to import zip files in the same way. The actual data import is handled by actual 
226 09 Jan 07 mbayer 199    PluginConfigurations that need to pre-exist before the import but these are autodetected by the code in the
226 09 Jan 07 mbayer 200    PluginConfigDetector class.
226 09 Jan 07 mbayer 201    */
226 09 Jan 07 mbayer 202   public boolean supportsConfigurations()
226 09 Jan 07 mbayer 203   {
226 09 Jan 07 mbayer 204     return false;
226 09 Jan 07 mbayer 205   }
226 09 Jan 07 mbayer 206
226 09 Jan 07 mbayer 207 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 208
226 09 Jan 07 mbayer 209   /**
226 09 Jan 07 mbayer 210    Returns information about where the plugin should be plugged in - in our case the Experiment view page.
226 09 Jan 07 mbayer 211    */
226 09 Jan 07 mbayer 212   public Set<GuiContext> getGuiContexts()
226 09 Jan 07 mbayer 213   {
226 09 Jan 07 mbayer 214     return guiContexts;
226 09 Jan 07 mbayer 215   }
226 09 Jan 07 mbayer 216
226 09 Jan 07 mbayer 217 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 218
226 09 Jan 07 mbayer 219   /**
226 09 Jan 07 mbayer 220    Currently not used -- required if the plugin needs interactive configuration by the user
226 09 Jan 07 mbayer 221    */
226 09 Jan 07 mbayer 222   public String isInContext(GuiContext context, Object item)
226 09 Jan 07 mbayer 223   {
226 09 Jan 07 mbayer 224     return null;
226 09 Jan 07 mbayer 225   }
226 09 Jan 07 mbayer 226
226 09 Jan 07 mbayer 227 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 228
226 09 Jan 07 mbayer 229   /**
226 09 Jan 07 mbayer 230    Returns info on parameters the user needs to enter before using the plugin. 
226 09 Jan 07 mbayer 231    */
226 09 Jan 07 mbayer 232   public RequestInformation getRequestInformation(GuiContext context, String command) throws BaseException
226 09 Jan 07 mbayer 233   {
226 09 Jan 07 mbayer 234     RequestInformation requestInformation = null;
226 09 Jan 07 mbayer 235     if (command.equals(Request.COMMAND_CONFIGURE_JOB))
226 09 Jan 07 mbayer 236     {
226 09 Jan 07 mbayer 237       requestInformation = getConfigureJob();
226 09 Jan 07 mbayer 238     }
226 09 Jan 07 mbayer 239     return requestInformation;
226 09 Jan 07 mbayer 240   }
226 09 Jan 07 mbayer 241
226 09 Jan 07 mbayer 242 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 243
226 09 Jan 07 mbayer 244   /**
226 09 Jan 07 mbayer 245    Get (and build) the request information for starting a job.
226 09 Jan 07 mbayer 246    */
226 09 Jan 07 mbayer 247   private RequestInformation getConfigureJob()
226 09 Jan 07 mbayer 248   {
226 09 Jan 07 mbayer 249     if (configureJob == null)
226 09 Jan 07 mbayer 250     {
226 09 Jan 07 mbayer 251       fileParameter = new PluginParameter<File>("file", "File", "The zip file to import the data from", 
226 09 Jan 07 mbayer 252               new FileParameterType(null, true, 1));
226 09 Jan 07 mbayer 253
226 09 Jan 07 mbayer 254       updateExistingParameter = new PluginParameter<Boolean>("updateExisting", 
226 09 Jan 07 mbayer 255               "Update existing items", 
226 09 Jan 07 mbayer 256               "If this option is selected, already existing items will be updated " + 
226 09 Jan 07 mbayer 257               " with the information in the file. If this option isn't selected " + 
226 09 Jan 07 mbayer 258               " existing items are left untouched.", 
226 09 Jan 07 mbayer 259               new BooleanParameterType(false, true));
226 09 Jan 07 mbayer 260       
226 09 Jan 07 mbayer 261       // Parameter for getting the current raw bioassay
226 09 Jan 07 mbayer 262       ItemParameterType<Experiment> experimentType = new ItemParameterType<Experiment>(Experiment.class, null, true, 1, null);
226 09 Jan 07 mbayer 263       experimentParameter = new PluginParameter<Experiment>
226 09 Jan 07 mbayer 264       (
226 09 Jan 07 mbayer 265         "experiment",
226 09 Jan 07 mbayer 266         "Experiment",
226 09 Jan 07 mbayer 267         "The experiment for importing the raw data into",
226 09 Jan 07 mbayer 268         experimentType
226 09 Jan 07 mbayer 269       );
226 09 Jan 07 mbayer 270       
226 09 Jan 07 mbayer 271       List<PluginParameter<?>> parameters = new ArrayList<PluginParameter<?>>(2);
226 09 Jan 07 mbayer 272       parameters.add(fileParameter);
226 09 Jan 07 mbayer 273       parameters.add(experimentParameter);
226 09 Jan 07 mbayer 274
226 09 Jan 07 mbayer 275       configureJob = new RequestInformation(Request.COMMAND_CONFIGURE_JOB, 
226 09 Jan 07 mbayer 276               "Select a file to import items from", "TODO - description", parameters);
226 09 Jan 07 mbayer 277     }
226 09 Jan 07 mbayer 278     return configureJob;
226 09 Jan 07 mbayer 279   }
226 09 Jan 07 mbayer 280
226 09 Jan 07 mbayer 281 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 282
226 09 Jan 07 mbayer 283   /**
226 09 Jan 07 mbayer 284    Sends parameter values entered by the user for processing by the plugin.
226 09 Jan 07 mbayer 285    Typically the plugin should validate that the parameter values are
226 09 Jan 07 mbayer 286    correct and then store them in the database.
226 09 Jan 07 mbayer 287    */
226 09 Jan 07 mbayer 288   public void configure(GuiContext context, Request request, Response response)
226 09 Jan 07 mbayer 289   {
226 09 Jan 07 mbayer 290     //set the current GUI context so we can use it elsewhere
226 09 Jan 07 mbayer 291     
226 09 Jan 07 mbayer 292     
226 09 Jan 07 mbayer 293     String command = request.getCommand();
226 09 Jan 07 mbayer 294     try
226 09 Jan 07 mbayer 295     {
226 09 Jan 07 mbayer 296       if (command.equals(Request.COMMAND_CONFIGURE_PLUGIN))
226 09 Jan 07 mbayer 297       {
226 09 Jan 07 mbayer 298         // TODO
226 09 Jan 07 mbayer 299       }
226 09 Jan 07 mbayer 300       else if (command.equals(Request.COMMAND_CONFIGURE_JOB))
226 09 Jan 07 mbayer 301       {
226 09 Jan 07 mbayer 302         // Validate user input
226 09 Jan 07 mbayer 303         List<Throwable> errors = validateRequestParameters(getConfigureJob().getParameters(), request);
226 09 Jan 07 mbayer 304         if (errors != null)
226 09 Jan 07 mbayer 305         {
226 09 Jan 07 mbayer 306           response.setError(errors.size() + " invalid parameter(s) were found in the request", errors);
226 09 Jan 07 mbayer 307           return;
226 09 Jan 07 mbayer 308         }
226 09 Jan 07 mbayer 309
226 09 Jan 07 mbayer 310         // Store user input
226 09 Jan 07 mbayer 311         storeValue(job, request, fileParameter);
226 09 Jan 07 mbayer 312         storeValue(job, request, updateExistingParameter);
226 09 Jan 07 mbayer 313         storeValue(job, request, experimentParameter);
226 09 Jan 07 mbayer 314
226 09 Jan 07 mbayer 315         // We are happy and done
226 09 Jan 07 mbayer 316         response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
226 09 Jan 07 mbayer 317       }
226 09 Jan 07 mbayer 318     }
226 09 Jan 07 mbayer 319     catch (Throwable ex)
226 09 Jan 07 mbayer 320     {
226 09 Jan 07 mbayer 321       response.setError(ex.getMessage(), Arrays.asList(ex));
226 09 Jan 07 mbayer 322     }
226 09 Jan 07 mbayer 323   }
226 09 Jan 07 mbayer 324
226 09 Jan 07 mbayer 325 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 326
226 09 Jan 07 mbayer 327   /**
226 09 Jan 07 mbayer 328    Required by the AutoDetectingImporter interface -- not sure why we actually need it since it never seems to be called
226 09 Jan 07 mbayer 329    */
226 09 Jan 07 mbayer 330   public void doImport(InputStream in, ProgressReporter progress) throws BaseException
226 09 Jan 07 mbayer 331   {
226 09 Jan 07 mbayer 332
226 09 Jan 07 mbayer 333   }
226 09 Jan 07 mbayer 334 //  ------------------------------------------------------------------------------------------------------------------------------------------  
226 09 Jan 07 mbayer 335   /**
226 09 Jan 07 mbayer 336   Returns some info about the plugin
226 09 Jan 07 mbayer 337    */
226 09 Jan 07 mbayer 338   public About getAbout()
226 09 Jan 07 mbayer 339   {
226 09 Jan 07 mbayer 340     return about;
226 09 Jan 07 mbayer 341   }
226 09 Jan 07 mbayer 342
226 09 Jan 07 mbayer 343 //  ------------------------------------------------------------------------------------------------------------------------------------------  
226 09 Jan 07 mbayer 344
226 09 Jan 07 mbayer 345   /**
226 09 Jan 07 mbayer 346   The main type is the kind of job the plugin is configured to do -- in our case it's importing stuff.
226 09 Jan 07 mbayer 347    */
226 09 Jan 07 mbayer 348   public Plugin.MainType getMainType()
226 09 Jan 07 mbayer 349   {
226 09 Jan 07 mbayer 350     return Plugin.MainType.IMPORT;
226 09 Jan 07 mbayer 351   }
226 09 Jan 07 mbayer 352
226 09 Jan 07 mbayer 353 //  ------------------------------------------------------------------------------------------------------------------------------------------    
226 09 Jan 07 mbayer 354
226 09 Jan 07 mbayer 355
226 09 Jan 07 mbayer 356 }//end class