From fefc07d6a9f878b1c1da72c297d116e65a9e2028 Mon Sep 17 00:00:00 2001 From: cramakri <cramakri> Date: Mon, 8 Oct 2012 12:55:52 +0000 Subject: [PATCH] Have the ipad read service return the extra metadata SVN: 27086 --- .../1/dss/reporting-plugins/ipad-read-service/ipad_read.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py index cbbb5c73ea7..0bff22ebed4 100644 --- a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py +++ b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py @@ -29,18 +29,19 @@ def add_row(builder, entry): def material_to_dict(material): material_dict = {} material_dict['SUMMARY_HEADER'] = material.getCode() - material_dict['SUMMARY'] = material.getPropertyValue("DESC") material_dict['IDENTIFIER'] = material.getMaterialIdentifier() material_dict['PERM_ID'] = material.getMaterialIdentifier() material_dict['ENTITY_KIND'] = 'MATERIAL' material_dict['ENTITY_TYPE'] = material.getMaterialType() if material.getMaterialType() == '5HT_COMPOUND': chemblId = material.getCode() + material_dict['SUMMARY'] = material.getPropertyValue("FORMULA") material_dict['IMAGE_URL'] = 'https://www.ebi.ac.uk/chemblws/compounds/%s/image' % chemblId else: + material_dict['SUMMARY'] = material.getPropertyValue("DESC") material_dict['IMAGE_URL'] = "" - prop_names = ["NAME", "PROT_NAME", "GENE_NAME", "LENGTH", "CHEMBL", "DESC"] + prop_names = ["NAME", "PROT_NAME", "GENE_NAME", "LENGTH", "CHEMBL", "DESC", "FORUMLA", "WEIGHT", "SMILES"] properties = dict((name, material.getPropertyValue(name)) for name in prop_names if material.getPropertyValue(name) is not None) material_dict['PROPERTIES'] = ObjectMapper().writeValueAsString(properties) return material_dict -- GitLab