Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

027-Clarity-Expected behaviour of the Item Query for Categories #92

Closed
stratosn opened this issue Dec 17, 2019 · 1 comment
Closed

027-Clarity-Expected behaviour of the Item Query for Categories #92

stratosn opened this issue Dec 17, 2019 · 1 comment

Comments

@stratosn
Copy link
Member

In #14 the support for getting Categorisations according to specific Categories (i.e. TargetCategories) was implemented. This is achieved via the Item Query #20 combined with the query string parameter reference=parents.

While requesting a specific Category requires also to specify the full path of its container Categories, it is not clear what to return when a Category, apart from being contained in another Category, contains also one or more Categories.

For example, assume the following request to the Global Registry, for the Category SECTORAL_STAT, which is contained within Category ECO_STAT:
https://registry.sdmx.org/ws/public/sdmxapi/rest/categoryscheme/SDMX/STAT_SUBJECT_MATTER/1.0/ECO_STAT.SECTORAL_STAT
While all Categories until SECTORAL_STAT shall be returned, any Categories under the latter are not, i.e.:

<str:CategoryScheme urn="urn:sdmx:org.sdmx.infomodel.categoryscheme.CategoryScheme=SDMX:STAT_SUBJECT_MATTER(1.0)" isExternalReference="false" isPartial="true" agencyID="SDMX" id="STAT_SUBJECT_MATTER" isFinal="false" version="1.0">
  <com:Annotations>...</com:Annotations>
  <com:Name xml:lang="en">SDMX Statistical Subject-Matter Domains</com:Name>
  <com:Description xml:lang="en">
  This is the canonical representation of the SDMX Content Guidelines for Statistical Subject-Matter Domains. Within SDMX, the list of Statistical Subject-Matter Domains (aligned to the Classification of International Statistical Activities maintained by the Conference of European Statisticians of the United Nations Economic Commission for Europe, UNECE) is a standard reference list against which the categorisation schemes of various participants in exchange arrangements can be mapped to facilitate data and metadata exchange.
  </com:Description>
  <str:Category urn="urn:sdmx:org.sdmx.infomodel.categoryscheme.Category=SDMX:STAT_SUBJECT_MATTER(1.0).ECO_STAT" id="ECO_STAT">
    <com:Annotations>...</com:Annotations>
    <com:Name xml:lang="en">Economic statistics</com:Name>
    <str:Category urn="urn:sdmx:org.sdmx.infomodel.categoryscheme.Category=SDMX:STAT_SUBJECT_MATTER(1.0).ECO_STAT.SECTORAL_STAT" id="SECTORAL_STAT">
      <com:Annotations>...</com:Annotations>
      <com:Name xml:lang="en">Sectoral statistics</com:Name>
    </str:Category>
  </str:Category>
</str:CategoryScheme>

NOTE: the Category ECO_STAT.SECTORAL_STAT contains six (6) Categories.

The question is: should it return the contained Categories, and consequently any Categories contained within the latter?

Moreover, another question that arises is how to apply reference resolution on the result partial Category Scheme, since it will contain all Categories required to return the requested Category, but also may include all Categories that the latter contains.

@stratosn stratosn self-assigned this Dec 17, 2019
@sosna sosna added this to the v2.0.0 milestone Dec 18, 2019
@sosna sosna added this to To do in v2.0.0 via automation Dec 18, 2019
@Tzaphkiel Tzaphkiel added this to To do in SDMX 3.0 via automation Dec 18, 2019
@dosse
Copy link
Contributor

dosse commented Feb 7, 2020

A connected question is the expected behaviour when querying CategorySchemes as references with detail=referencepartial.

E.g. Let's assume that a dataflow is categorised in a second-level category (which has also itself child categories). When querying http://sdmx-ws-root/dataflow/[agencyID]/[dataflowID]/[version]?references=all&detail=referencepartial, then the CategoryScheme in the references contains:

  • the (second-level) category in which the dataflow was categoried
  • its parent category (necessary because the category doesn't exist on its own and it is useful in our use cases 😊)
  • ?? its child (and grand-children) categories (which we rather would avoid for our use cases...)

@sosna sosna moved this from To do to In progress in v2.0.0 Mar 11, 2020
@sosna sosna added the sdmx 3.0 label Sep 3, 2020
@sosna sosna changed the title Expected behaviour of the Item Query for Categories 027-Clarity-Expected behaviour of the Item Query for Categories Sep 3, 2020
@sosna sosna moved this from In progress to Needs review in v2.0.0 Dec 15, 2020
@sosna sosna moved this from Needs review to Done in v2.0.0 Dec 17, 2020
@sosna sosna closed this as completed Oct 11, 2021
SDMX 3.0 automation moved this from To do to Done Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SDMX 3.0
  
Done
v2.0.0
  
Done
Development

No branches or pull requests

3 participants