From c11bd00462c914fb168610c5c6d85abb6443e29b Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Tue, 8 Sep 2009 09:13:43 +0000 Subject: [PATCH] SE-137 add treatment type code to ListProteinByExperimentCriteria SVN: 12511 --- .../ProteinByExperimentBrowerToolBar.java | 15 ++++++++++----- .../ProteinByExperimentBrowserGrid.java | 4 +++- .../dto/ListProteinByExperimentCriteria.java | 11 +++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowerToolBar.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowerToolBar.java index 5055650873d..68c11e384e7 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowerToolBar.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowerToolBar.java @@ -268,11 +268,11 @@ class ProteinByExperimentBrowerToolBar extends ToolBar AggregateFunction aggregateFunction = getSelection(aggregateFunctionComboBox, DEFAULT_AGGREGATE_FUNCTION); TechId experimentID = TechId.create(experiment); - AsyncCallback<List<AbundanceColumnDefinition>> callback = - new AbundanceColumnDefinitionsCallback(viewContext, browserGrid, experimentID, - falseDiscoveryRate, aggregateFunction); VocabularyTermModel value = treatmentTypeComboBox.getValue(); String treatmentTypeCode = value == null ? null : value.getTerm().getCode(); + AsyncCallback<List<AbundanceColumnDefinition>> callback = + new AbundanceColumnDefinitionsCallback(viewContext, browserGrid, experimentID, + falseDiscoveryRate, aggregateFunction, treatmentTypeCode); viewContext.getService().getAbundanceColumnDefinitionsForProteinByExperiment( experimentID, treatmentTypeCode, callback); } @@ -295,21 +295,26 @@ class ProteinByExperimentBrowerToolBar extends ToolBar private final AggregateFunction aggregateFunction; + private final String treatmentTypeCode; + public AbundanceColumnDefinitionsCallback(IViewContext<?> viewContext, ProteinByExperimentBrowserGrid browserGrid, TechId experimentID, - double falseDiscoveryRate, AggregateFunction aggregateFunction) + double falseDiscoveryRate, AggregateFunction aggregateFunction, + String treatmentTypeCode) { super(viewContext); this.browserGrid = browserGrid; this.experimentID = experimentID; this.falseDiscoveryRate = falseDiscoveryRate; this.aggregateFunction = aggregateFunction; + this.treatmentTypeCode = treatmentTypeCode; } @Override protected void process(List<AbundanceColumnDefinition> result) { - browserGrid.update(experimentID, falseDiscoveryRate, aggregateFunction, result); + browserGrid.update(experimentID, falseDiscoveryRate, aggregateFunction, + treatmentTypeCode, result); } } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowserGrid.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowserGrid.java index bb8107aeb13..3c241e6e4f1 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowserGrid.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/ProteinByExperimentBrowserGrid.java @@ -97,12 +97,14 @@ class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinIn } void update(TechId experimentID, double falseDiscoveryRate, - AggregateFunction aggregateFunction, List<AbundanceColumnDefinition> definitions) + AggregateFunction aggregateFunction, String treatmentTypeCode, + List<AbundanceColumnDefinition> definitions) { criteria = new ListProteinByExperimentCriteria(); criteria.setExperimentID(experimentID); criteria.setFalseDiscoveryRate(falseDiscoveryRate); criteria.setAggregateFunction(aggregateFunction); + criteria.setTreatmentTypeCode(treatmentTypeCode); abundanceColumnDefinitions = definitions; refresh(null, true); } diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/dto/ListProteinByExperimentCriteria.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/dto/ListProteinByExperimentCriteria.java index 7ece7ef0e5c..21f96b8950d 100644 --- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/dto/ListProteinByExperimentCriteria.java +++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/dto/ListProteinByExperimentCriteria.java @@ -31,6 +31,7 @@ public class ListProteinByExperimentCriteria extends DefaultResultSetConfig<Stri private TechId experimentID; private double falseDiscoveryRate; private AggregateFunction aggregateFunction; + private String treatmentTypeCode; public final TechId getExperimentID() { @@ -61,5 +62,15 @@ public class ListProteinByExperimentCriteria extends DefaultResultSetConfig<Stri { this.aggregateFunction = aggregateFunction; } + + public final String getTreatmentTypeCode() + { + return treatmentTypeCode; + } + + public final void setTreatmentTypeCode(String treatmentTypeCode) + { + this.treatmentTypeCode = treatmentTypeCode; + } } -- GitLab