Changeset 999
- Timestamp:
- Mar 27, 2009, 3:35:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/base2/net.sf.basedb.pluginutilities/trunk/src/net/sf/basedb/plugins/AbstractRunBinaryPlugin.java
r990 r999 2 2 $Id$ 3 3 4 Copyright (C) 2008 Jari Hakkinen4 Copyright (C) 2008, 2009 Jari Hakkinen 5 5 6 6 This file is part of the PluginUtilities … … 29 29 import net.sf.basedb.core.BioAssaySet; 30 30 import net.sf.basedb.core.DbControl; 31 import net.sf.basedb.core.Experiment; // Jari, remove this?32 import net.sf.basedb.core.InvalidUseOfNullException; // Jari, remove this?33 31 import net.sf.basedb.core.Job; 34 32 import net.sf.basedb.core.PluginDefinition; 35 33 import net.sf.basedb.core.PluginParameter; 36 34 import net.sf.basedb.core.ProgressReporter; 37 import net.sf.basedb.core.RawBioAssay; // Jari, remove this?38 35 import net.sf.basedb.core.RequestInformation; 36 import net.sf.basedb.core.SpotBatcher; 37 import net.sf.basedb.core.Transformation; 38 import net.sf.basedb.util.Values; 39 39 40 40 import net.sf.basedb.core.plugin.About; … … 283 283 DbControl dc=sc.newDbControl(); 284 284 try { 285 String name=(String)job.getValue("name");286 if (name==null)287 name="New bioassay set";288 285 if (sourceBAS==null) 289 286 sourceBAS = getSourceBioAssaySet(dc); 290 287 runBinary(); 291 storeResult(dc ,name);288 storeResult(dc); 292 289 // dc.commit(); 293 290 response.setDone("Plug-in ended successfully"); … … 323 320 324 321 325 abstract protected void storeResult(DbControl dc, String name); 322 private void storeResult(DbControl dc) 323 { 324 // Create Transformation 325 Transformation t = sourceBAS.newTransformation(this.getCurrentJob(dc)); 326 t.setName(about.getName()); 327 dc.saveItem(t); 328 329 // Create the normalized bioassay set 330 BioAssaySet child = t.newProduct(null, "new", true); 331 child.setName(Values.getString((String)job.getValue(CHILD_NAME), 332 sourceBAS.getName())); 333 child.setDescription((String)job.getValue(CHILD_DESCRIPTION)); 334 dc.saveItem(child); 335 336 // Batcher for inserting normalized data 337 SpotBatcher batcher = child.getSpotBatcher(); 338 storeResult(batcher); 339 } 340 341 342 abstract protected void storeResult(SpotBatcher batcher) 343 throws BaseException; 326 344 327 345 … … 339 357 protected String subprocess_stdin=null; 340 358 protected String subprocess_stdout=null; 359 protected String metadata=null; 341 360 342 361 private String binaryPath=null;
Note: See TracChangeset
for help on using the changeset viewer.