From 638b60068262a6238d3b69560f24a0fa68fd616b Mon Sep 17 00:00:00 2001 From: Michael Baumann Date: Fri, 25 May 2018 11:44:52 -0700 Subject: [PATCH] Add "aliases" field to the data provided by the dashboard service The "aliases" field will contain GUIDs and possible other alternate data identifiers. --- config/mapping_config.json | 1 + config/request_config.json | 6 ++++-- responseobjects/api_response.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/mapping_config.json b/config/mapping_config.json index 475f559..3e3c3cf 100644 --- a/config/mapping_config.json +++ b/config/mapping_config.json @@ -45,6 +45,7 @@ "fileVersion": "file_version", "urls": "urls", "dosUrl": "dosUrl", + "aliases": "aliases", "lastModified": "lastModified", "repoBaseUrl": "repoBaseUrl", "repoCode": "repoCode", diff --git a/config/request_config.json b/config/request_config.json index 1bca95b..d3ce12d 100644 --- a/config/request_config.json +++ b/config/request_config.json @@ -35,7 +35,8 @@ "Upload File ID": "file_id", "Data Bundle UUID": "repoDataBundleId", "Metadata.json": "metadataJson", - "File URLs": "urls" + "File URLs": "urls", + "File Aliases": "aliases" }, "autocomplete-translation": { "ES_FILE_INDEX": { @@ -99,7 +100,8 @@ "Upload File ID", "Data Bundle UUID", "Metadata.json", - "File URLs" + "File URLs", + "File Aliases" ], "facets": [ "centerName", diff --git a/responseobjects/api_response.py b/responseobjects/api_response.py index 86d3f54..999c8b5 100644 --- a/responseobjects/api_response.py +++ b/responseobjects/api_response.py @@ -34,6 +34,7 @@ class FileCopyObj(JsonObject): fileVersion = StringProperty() urls = ListProperty(StringProperty) dosUri = StringProperty() + aliases = ListProperty(StringProperty) # DateTimeProperty Int given the ICGC format uses # an int and not DateTimeProperty lastModified = StringProperty() @@ -454,6 +455,7 @@ def make_file_copy(self, mapping, entry): urls=self.fetch_entry_value(mapping, entry, 'urls'), dosUri=self.compose_dos_uri(self.fetch_entry_value(mapping, entry, 'fileId'), self.fetch_entry_value(mapping, entry, 'fileVersion')), + aliases=self.fetch_entry_value(mapping, entry, 'aliases'), lastModified=self.fetch_entry_value( mapping, entry, 'lastModified') )