From 183b096472e4e36fa02aa9c46db3d01c022fc8b6 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Thu, 21 Jan 2010 07:21:18 +0000 Subject: [PATCH] Add property ABUNDANCE to columns without treatment properties SVN: 14364 --- .../application/ProteinByExperimentBrowserGrid.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 6c159e592c5..39ff508095c 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 @@ -65,6 +65,8 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.basic.dto.Treatment; */ class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinInfo> { + private static final String ABUNDANCE_PROPERTY_KEY = "ABUNDANCE"; + private static final String PREFIX = GenericConstants.ID_PREFIX + "protein-by-experiment-browser"; @@ -184,18 +186,20 @@ class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinIn String header = definition.getSampleCode(); final long sampleID = definition.getID(); List<Treatment> treatments = definition.getTreatments(); - Map<String, String> properties = null; + Map<String, String> properties = new HashMap<String, String>(); if (treatments.isEmpty() == false) { header = ""; String delim = ""; - properties = new HashMap<String, String>(); for (Treatment treatment : treatments) { header += delim + treatment; delim = ", "; properties.put(treatment.getTypeCode(), treatment.getValue()); } + } else + { + properties.put(ABUNDANCE_PROPERTY_KEY, header); } columns.add(new InternalAbundanceColumnDefinition(header, properties, 100, false, sampleID)); -- GitLab