Skip to content
Snippets Groups Projects
Commit 183b0964 authored by felmer's avatar felmer
Browse files

Add property ABUNDANCE to columns without treatment properties

SVN: 14364
parent f1100d9d
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,8 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.basic.dto.Treatment; ...@@ -65,6 +65,8 @@ import ch.systemsx.cisd.openbis.plugin.phosphonetx.shared.basic.dto.Treatment;
*/ */
class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinInfo> class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinInfo>
{ {
private static final String ABUNDANCE_PROPERTY_KEY = "ABUNDANCE";
private static final String PREFIX = private static final String PREFIX =
GenericConstants.ID_PREFIX + "protein-by-experiment-browser"; GenericConstants.ID_PREFIX + "protein-by-experiment-browser";
...@@ -184,18 +186,20 @@ class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinIn ...@@ -184,18 +186,20 @@ class ProteinByExperimentBrowserGrid extends AbstractSimpleBrowserGrid<ProteinIn
String header = definition.getSampleCode(); String header = definition.getSampleCode();
final long sampleID = definition.getID(); final long sampleID = definition.getID();
List<Treatment> treatments = definition.getTreatments(); List<Treatment> treatments = definition.getTreatments();
Map<String, String> properties = null; Map<String, String> properties = new HashMap<String, String>();
if (treatments.isEmpty() == false) if (treatments.isEmpty() == false)
{ {
header = ""; header = "";
String delim = ""; String delim = "";
properties = new HashMap<String, String>();
for (Treatment treatment : treatments) for (Treatment treatment : treatments)
{ {
header += delim + treatment; header += delim + treatment;
delim = ", "; delim = ", ";
properties.put(treatment.getTypeCode(), treatment.getValue()); properties.put(treatment.getTypeCode(), treatment.getValue());
} }
} else
{
properties.put(ABUNDANCE_PROPERTY_KEY, header);
} }
columns.add(new InternalAbundanceColumnDefinition(header, properties, 100, false, columns.add(new InternalAbundanceColumnDefinition(header, properties, 100, false,
sampleID)); sampleID));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment