Changeset 1002


Ignore:
Timestamp:
Mar 27, 2009, 5:06:17 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Added support to optionally select assays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.pluginutilities/trunk/src/net/sf/basedb/plugins/AbstractRunBinaryPlugin.java

    r1001 r1002  
    2727
    2828import net.sf.basedb.core.BaseException;
     29import net.sf.basedb.core.BioAssay;
    2930import net.sf.basedb.core.BioAssaySet;
    3031import net.sf.basedb.core.DbControl;
     32import net.sf.basedb.core.ItemParameterType;
    3133import net.sf.basedb.core.Job;
    3234import net.sf.basedb.core.PluginDefinition;
     
    225227      parameters.add(getChildDescriptionParameter(null, null, null));
    226228
     229      if (selectBASconfigure) {
     230        DbControl dc = null;
     231        try
     232        {
     233          dc = sc.newDbControl();
     234          if (sourceBAS == null) sourceBAS = getSourceBioAssaySet(dc);
     235          List<BioAssay> assays = sourceBAS.getBioAssays().list(dc);
     236          PluginParameter<BioAssay> par = new PluginParameter<BioAssay>
     237            ( "selectBAS", "Select assays", selectBASdescription,
     238              new ItemParameterType<BioAssay>(BioAssay.class, assays.get(0),
     239                                              true, 0, assays) );
     240          parameters.add(par);
     241        }
     242        finally
     243        {
     244          if (dc != null) dc.close();
     245        }
     246      }
     247
    227248      configureJob = new RequestInformation(
    228249        Request.COMMAND_CONFIGURE_JOB, about.getName() + " options",
     
    360381  protected Plugin.MainType plugin_maintype=null;
    361382  protected BioAssaySet sourceBAS = null;
     383  protected BioAssaySet selectBAS = null;
     384  protected Boolean selectBASconfigure = false;
     385  protected String selectBASdescription = null;
    362386  protected String subprocess_stdin=null;
    363387  protected String subprocess_stdout=null;
Note: See TracChangeset for help on using the changeset viewer.