Add additional downloads for external resources through specific dataflow annotation
As a .Stat DE user (visualisation page)
In order to be able to download related material (ready-made files prepared and stored externally, e.g. pre-generated Excel files, a proprietary csv format, or even a pdf with referential metadata while the right panel metadata is not ready)
I want to have additional download options for those files that were previously attached as annotation to the dataflow.
Scenario 1: Extend download menu options according to all dataflow annotations "EXT_RESOURCE"
Given that I'm using the DE visualisation page
When a dataflow has one or more valid annotations of type "EXT_RESOURCE" (see SDMX-JSON syntax below)
Then below the out-of-the-box download options, one localised download option per annotation is added, after an additional separator line.
Example mockup that corresponds to the below SDMX-JSON syntax example:
SDMX-JSON syntax (structure or data message)
- Syntax - in dataflow definition (structure message) or dataset definition (data message) for adding additional download options for external resources:
"annotations": [{
"type": "EXT_RESOURCE",
"text": "<a href='http://www.ilo.org/ilostat-files/Documents/Excel/MBI_535_EN.xlsx'><img src='https://www.ilo.org/ilostat/images/downloadexcel-24.png'/> All data in Excel</a>",
"texts": {
"en": "<a href='http://www.ilo.org/ilostat-files/Documents/Excel/MBI_535_EN.xlsx'><img src='https://www.ilo.org/ilostat/images/downloadexcel-24.png'/> All data in Excel</a>",
"fr": "<a href='http://www.ilo.org/ilostat-files/Documents/Excel/MBI_535_FR.xlsx'><img src='https://www.ilo.org/ilostat/images/downloadexcel-24.png'/> Toutes les données en Excel</a>"
}
},{
"type": "EXT_RESOURCE",
"text": "<a href='http://www.ilo.org/ilostat-files/Documents/Metadata/Ref_MD_EN.xlsx'>Explanatory information in pdf</a>",
"texts": {
"en": "<a href='http://www.ilo.org/ilostat-files/Documents/Metadata/Ref_MD_EN.xlsx'>Explanatory information in pdf</a>",
"fr": "<a href='http://www.ilo.org/ilostat-files/Documents/Metadata/Ref_MD_FR.xlsx'>Informations explicatives en pdf</a> }
}]
NOTES:
- Any type of format (stored externally) can be triggered for download. Triggering the download of the external source should whether download the content, or open it (for display or download) in a separated tab of the web browser.
- The content of the localised "text"/"texts" element is expected to be a valid HTML href element with href property (hyperlink to the resource) and content, which could also include an icon (as shown in the above example SDMX-JSON).
- The localised annotation text is applied according to the current locale of the DE.
- The styles of the out-of-the-box download options are to be applied to the download options for external resources. The above mockup is not 100% perfect in this regard.
- The order of the added download option respects the order of the annotations as they have been provided.
- Technically, the HTML syntax might need to be escaped in the annotation (as done in dataflow description). To be validated by the developer.
- For the graphical style of the separator line please see comment below.
PS: Unfortunately, the SDMX annotation's URL element is a non-localized string so it can’t be used to reference the resource. (We should propose at the TWG to make URL localized for the future SDMX 3.0).