Skip to content

Is MetadataAttribute one class, or two classes? #53

@khaeru

Description

@khaeru

(I am opening an issue here because this issue tracker seems to be in active use, even if though the repo's default branch README shows a “restructuring” message that is 7 years old. If this is the wrong place for the issue, please let me know where to file instead.)

The Information Model (SDMX Section 2), Version 3.1, revision 1.0 is ambiguous about certain aspects of the metadatastructure::MetadataAttribute class. (I'll abbreviate this as "mds::MA" to make this more readable).

The standards doc contains, inter alia, the following. All emphasis added by me, inline comments in bold.

  1. §3.6.2 / p.39 / l.791 / fig.14 shows AttributeComponent (AC) as an abstract class with 2 concrete sub classes: "datastructure::DataAttribute" (I'll use "ds::DA") and mds::MA.
  2. §3.6.3.1 / p.41 / l.815: “The type of Component in a ComponentList is dependent on the concrete class of the ComponentList as follows: …AttributeDescriptor: DataAttribute, MetadataAttributeRef …”
    • As far as I can tell, MetadataAttributeRef appears nowhere else in the standards.
  3. §5.2.2.1 / p.74 / l.1289: “AttributeDescriptor — content is DataAttribute and an association to MetadataAttribute.”
  4. §5.3.2.1 / p.75 / l.1308: “a DataStructureDefinition [DSD] may be related to one MetadataStructureDefinition [MSD], in order to use the latter's MetadataAttributes, by relating them to other Components within the DSD, as explained below.”
  5. l.1342: “The valid values for a … MetadataAttribute, when used in this DSD, are defined by the representation. […] the Representations of MAs are specified in the corresponding MSD, linked by the DSD.”
  6. p.76 / l.1375: “The AD may contain one or more Attributes, i.e., at least one DA definition or one MA reference.”
  7. l.1391: “A DA or an MA is specified as being +relatedTo an AttributeRelationship,”
  8. p.77 / l.1409 / fig.29: shows that the association of a DA to an AR is named "+relatedTo", but the assocation of an MA to an AR is named "+metadataRelationship".
    • This contradicts (7).
  9. p.79 / l.1418: “Each of … and MA can have a Representation specified […] An exception is the MA, where is Representation is specified in the MSD.”
  10. §7.3.4.1 / p.97 / l.1620: “a MSD defines the MAs, within an MetadataAttributeDescriptor (MAD), that can be associated with the objects identified in the Metadataflows and MetadataProvisionAgreements that refer to the MSD.”
    • Neither here, nor elsewhere in this section, is it mentioned that DSDs (per §5) may also refer to MSDs.
  11. p.98 / l.1639: “the specification of objects to which a MA can be attached is indirect: the MAs are defined in a MSD, but [continues without mentioning DSDs]. In this way, the MSD can be used to define any set of MAs regardless of the objects to which they can be attached.”
  12. §7.3.4.2 / p.99 / l.1669: the table includes "MetadataAttribute" and gives its properties as /hierachy, /conceptIdentity, +isPresentational, +minOccurs, +maxOccurs, /localRepresentation.
    • +relatedTo/+metadataRelationship is not mentioned.
  13. §7.4.1 / p.101 / l.1672 / fig. 34: shows the same properties as (12) for "mds::MA".
    • It does not show +relatedTo/+metadataRelationship.

Based on this, I see two possible intepretations:

Interpretation A: There is only one class metadatastructure::MetadataAttribute.

  • A DSD → AttributeDescriptor describes its DataAttributes first-hand, but its MetadataAttributes are nothing more than references to MAs in an associated MSD.
  • The mention of "MetadataAttributeRef" (2) is a typo.
  • The single mds::MA class has properties +minOccurs, +maxOccurs, etc. as described at (12–13) and also +relatedTo or +metadataRelationship as described at (7–8).

This interpretation is better supported by the text, but leads to a contradiction:

  • MA+metadataRelationship can be 0…1 AttributeRelationship (per fig.29), including DimensionRelationship or GroupRelationship.
  • But every DSD has different dimensions and groups.
  • Thus any MSD, through its MAD → MAs, can only specify 1 possible AttributeRelationship.
  • For example, if an MA has a DimensionRelationship to a dimension 'FOO', then it, and its MSD, could never be referenced in a coherent manner from any DSD that without a 'FOO' dimension.

This would seem to defeat the intended usage described at (11). It would require that nearly-identical MSDs be created for each different DSD.

Interpretation B: There are two classes: mds::MA and some other class, which we might call “datastructure::MetadataAttributeRef” or (per the SDMX-ML tag name) “datastructure::MetadataAttributeUsage”.

  • MetadataAttribute{Ref,Usage} has at least:
    • the +relatedTo/+metadataRelationship association to an AR.
    • an association to a mds::MA.
  • mds::MA has exactly and only the properties given in (12–13), i.e. +minOccurs, +maxOccurs, /localRepresentation etc.

This interpretation seems coherent, consistent with the SDMX-ML 3.0 schemas (here) and their use “in the wild”, but is not clearly communicated by the standards document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions