diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadService.h b/openbis-ipad/BisKit/Classes/CISDOBIpadService.h index ae87cf0e6ec8e005305838cb55da0308c46146b7..42c07eb23519f0160d05c74798d5cc6e978e496d 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadService.h +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadService.h @@ -74,6 +74,7 @@ enum CISOBIpadServiceErrorCode { @property(readonly) NSString *refcon; @property(readonly) NSString *group; @property(readonly) NSString *imageUrl; -@property(readonly) NSString *properties; //<! The properties as a JSON string. +@property(readonly) NSString *children; //<! The permIds of the children as a JSON string +@property(readonly) NSString *properties; //<! The properties as a JSON string. @end diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m index ec628317aa3536672d7179ec625c2947081156d5..201bb72b58d0e9ff84a96d6220a7204460274070 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m @@ -200,6 +200,7 @@ NSString *const CISDOBIpadServiceErrorDomain = @"CISDOBIpadServiceErrorDomain"; - (NSString *)refcon { return [self stringContentValueAtIndex: 4]; } - (NSString *)group { return [self stringContentValueAtIndex: 5]; } - (NSString *)imageUrl { return [self stringContentValueAtIndex: 6]; } -- (NSString *)properties { return [self stringContentValueAtIndex: 7]; } +- (NSString *)children { return [self stringContentValueAtIndex: 7]; } +- (NSString *)properties { return [self stringContentValueAtIndex: 8]; } @end diff --git a/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m b/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m index 85d93af3fdda1c14486fc38fd3767975b99ee163..9b98eac92ec8c41772d77208c085c8d4ce211bc1 100644 --- a/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m +++ b/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m @@ -75,6 +75,7 @@ STAssertNotNil(rawEntity.refcon, @"Ref con should not be nil"); STAssertNotNil(rawEntity.group, @"Group should not be nil"); STAssertNotNil(rawEntity.imageUrl, @"Image url should not be nil"); + STAssertNotNil(rawEntity.children, @"Children should not be nil"); STAssertNotNil(rawEntity.properties, @"Properties type should not be nil"); } } diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index 066629d63211e14c198b7f6c60585463b99d7710..517be1ec1c7d1f3f13e18d898664a21d795f5c5f 100644 Binary files a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ 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 199cd96f9b6e4d33af58e36088d18bf8c75d81b1..4eb812a2ffdfad3ee8d403e38d88fff225d526bf 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 @@ -18,8 +18,8 @@ def add_headers(builder): may appear as children of other entities. IMAGE_URL : A url for an image associated with this entity. If None or empty, no image is shown. - CHILDREN : Child entities - PROPERTIES : Properties (metadata) that should be displayed for this entity. + CHILDREN : The permIds of the children of this entity. Transmitted as JSON. + PROPERTIES : Properties (metadata) that should be displayed for this entity. Transmitted as JSON. """ builder.addHeader("SUMMARY_HEADER") builder.addHeader("SUMMARY") @@ -42,7 +42,7 @@ def add_row(builder, entry): row.setCell("REFCON", entry.get("REFCON")) row.setCell("GROUP", entry.get("GROUP")) row.setCell("IMAGE_URL", entry.get("IMAGE_URL")) - row.setCell("CHILDREN", "[]") + row.setCell("CHILDREN", entry.get("CHILDREN")) row.setCell("PROPERTIES", str(entry.get("PROPERTIES"))) def material_to_dict(material): @@ -61,7 +61,9 @@ def material_to_dict(material): 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'] = "" + material_dict['IMAGE_URL'] = "" + + material_dict['CHILDREN'] = ObjectMapper().writeValueAsString([]) prop_names = ["NAME", "PROT_NAME", "GENE_NAME", "LENGTH", "CHEMBL", "DESC", "FORMULA", "WEIGHT", "SMILES"] properties = dict((name, material.getPropertyValue(name)) for name in prop_names if material.getPropertyValue(name) is not None) @@ -80,6 +82,10 @@ def sample_to_dict(five_ht_sample): sample_dict['REFCON'] = ObjectMapper().writeValueAsString(refcon) sample_dict['GROUP'] = five_ht_sample.getSampleType() sample_dict['IMAGE_URL'] = "" + + children = [five_ht_sample.getPropertyValue("TARGET"), five_ht_sample.getPropertyValue("COMPOUND")] + sample_dict['CHILDREN'] = ObjectMapper().writeValueAsString(children) + prop_names = ["DESC"] properties = dict((name, five_ht_sample.getPropertyValue(name)) for name in prop_names if five_ht_sample.getPropertyValue(name) is not None) sample_dict['PROPERTIES'] = ObjectMapper().writeValueAsString(properties) diff --git a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index bbd299f9c952de2e30b6082636054d7941e196bd..263f41786bade207c24a8f467ec73afd29e4451c 100644 Binary files a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ