Add feature to define MSD for DSD
As Jens,
I want to easily attach an MSD to a DSD (within the given space),
So what less manual work is required before the ref metadata can be edited in Excel.
Specifications:
-
In the context menu of the dsd (as well as in the multi-selection menu for dsd) just below "Transfer structure" add a new menu entry to "Add ref. metadata link" (using icon https://mui.com/components/material-icons/?selected=TextSnippet). Note that this feature is only available for dsds belonging to an internal space and if the DSD doesn't already have an MSD link (annotations can be obtained for the requested artefact using the URL option
detail=allcompletestubs
). -
When this menu is clicked, open a popup window that shows the list of MSDs of the related data space (for multi-selection menu click use the first internal space of the checked DSDs).
Important note: If the DSD is final then that the popup window should list only final MSDs.
-
When the user selected one MSD and clicked on "Link", then immediately update the corresponding DSD structure(s) with an additional annotation and submit it/them to the related data space SDMX API. Note that the DSD might already have other annotations that need to be kept.
<message:Structures> <structure:DataStructures> <structure:DataStructure id="[DSD_ID]" agencyID="[DSD_AGENCY_ID]" version="[DSD_VERSION]" [other properties]"> <common:Annotations> <common:Annotation> <common:AnnotationTitle>urn:sdmx:org.sdmx.infomodel.metadatastructure.MetadataStructure=[MSD_AGENCY_ID]:[MSD_ID]([MSD_VERSION])</common:AnnotationTitle> <common:AnnotationType>METADATA</common:AnnotationType> </common:Annotation> </common:Annotations> <common:Name ...
-
Indicate the success/failure of the link creation with a green/red https://mui.com/components/material-icons/?selected=TextSnippet icon next to the dsd's context menu, similar to green/red status icons for data transfer or categorisations.
In case of the usage of the multi-selection menu, then show the following error:- for those DSDs that already have an MSD link: "The data structure {DSD_AGENCY_ID:DSD_VERSION(DSD_VERSION)} already has a link to the metadata structure {MSD_AGENCY_ID:MSD_VERSION(MSD_VERSION)}, which can't be replaced."
- for those DSDs not in an internal space: "Insufficient write access to the data structure {DSD_AGENCY_ID:DSD_VERSION(DSD_VERSION)} in space {space_id}"
- for those DSDs not in the same internal space as the MSD: "The data structure {DSD_AGENCY_ID:DSD_VERSION(DSD_VERSION)} and the metadata structure {MSD_AGENCY_ID:MSD_VERSION(MSD_VERSION)} are not in the same data space and cannot be linked."