Changeset 3575
- Timestamp:
- Jul 19, 2007, 3:42:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/plugin/AbstractAnalysisPlugin.java
r3569 r3575 25 25 26 26 import java.util.Collections; 27 import java.util.List; 27 28 import java.util.Set; 28 29 30 import net.sf.basedb.core.BioAssay; 29 31 import net.sf.basedb.core.BioAssaySet; 30 32 import net.sf.basedb.core.DbControl; … … 107 109 108 110 /** 111 The bioAssays subset parameter. 112 To use when working on subset of bioassays in a bioAssaySet 113 @see #getSourceBioAssaysSubSetParameter(String, String, List<BioAssay>) 114 */ 115 private PluginParameter<BioAssay> sourceSubSetParameter = null; 116 117 /** 109 118 Create a new <code>AbstractAnalysisPlugin</code>. 110 119 */ … … 200 209 } 201 210 return sourceParameter; 211 } 212 213 protected static final String SOURCE_BIOASSAYS = "source_subset"; 214 215 /** 216 Gets a plugin parameter that asks for a subset of bioassays to use as data source 217 for the plugin. 218 @param label The parameter's label. Uses a default value if null. 219 * @param description Description of the parameter. Uses a default value if null. 220 @return A plugin parameter 221 @since 2.4 222 */ 223 protected PluginParameter<BioAssay> getSourceBioAssaysParameter(String label, String description) 224 { 225 if (sourceSubSetParameter == null) 226 { 227 if (label == null) label = "Source bioassays"; 228 if (description == null) description = "Select the bioassays that should be filtered. " + 229 "If no bioassay is selected all will be filtered."; 230 sourceSubSetParameter = new PluginParameter<BioAssay> 231 ( 232 SOURCE_BIOASSAYS, label, description, 233 new ItemParameterType<BioAssay>(BioAssay.class, null, false, 0, null) 234 ); 235 } 236 return sourceSubSetParameter; 202 237 } 203 238 … … 336 371 337 372 /** 373 Gets a list of bioassays that were selected from the current bioassay set, to use for the analysis. 374 @param dc The DbControl to access the database with 375 @return A list with bioassays or null. 376 @since 2.4 377 */ 378 @SuppressWarnings("unchecked") 379 protected List<BioAssay> getSourceBioAssays(DbControl dc) 380 { 381 List<BioAssay> bioAssaySubset = (List<BioAssay>)job.getValues(SOURCE_BIOASSAYS); 382 if (bioAssaySubset != null) 383 { 384 for (BioAssay ba : bioAssaySubset) 385 { 386 dc.reattachItem(ba); 387 } 388 } 389 return bioAssaySubset; 390 } 391 392 /** 338 393 Generate a name for the transformation based on the plugin and it's 339 394 configuration. The name is created by taking the name of the plugin from the
Note: See TracChangeset
for help on using the changeset viewer.