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

RDF/SKOS encoding of hierarchical code list #121

Closed
heidivanparys opened this issue Dec 13, 2021 · 0 comments
Closed

RDF/SKOS encoding of hierarchical code list #121

heidivanparys opened this issue Dec 13, 2021 · 0 comments
Assignees
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Milestone

Comments

@heidivanparys
Copy link
Contributor

I created the following structure in a register:

  • register
    • codelist
      • value1
        • value1_1
      • value2

image

image

image

Retrieving the codelist in RDF format gives the following (statements not related to SKOS are removed):

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:adms="http://www.w3.org/ns/adms#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:vann="http://purl.org/vocab/vann/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/">
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#ConceptScheme"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">my code list</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;definition of my code list&lt;/p&gt;</skos:definition>
      <!-- ... -->
      <skos:hasTopConcept rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1"/>
      <skos:hasTopConcept rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value2"/>
	  <!-- ... -->
   </rdf:Description>
   <!-- ... -->
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">value 1</skos:prefLabel>
      <skos:definition xml:lang="en">&lt;p&gt;my definition of value 1&lt;/p&gt;</skos:definition>
      <skos:narrower rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1_1"/>
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
	  <!-- ... -->
   </rdf:Description>
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:prefLabel xml:lang="en">value 1_1</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;definition of value 1_1&lt;/p&gt;</skos:definition>
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1"/>
      <!-- ... -->
   </rdf:Description>
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value2">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">value 2</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;definition of value 2&lt;/p&gt;</skos:definition>
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
   </rdf:Description>
</rdf:RDF>

Issue 1

The codelist skos:hasTopConcept value1 and value2, but value1, value2 and value1_1 skos:topConceptOf the codelist. The following statement should not be present in the output:

<rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
   </rdf:Description>

Issue 2

The following statements should not be present in the output, as the code list is a concept scheme, and the values are in that concept scheme, the concept scheme is not “broader than” the values.

<rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1">
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
   </rdf:Description>
<rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value2">
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
   </rdf:Description>

Retrieving value1 in RDF format gives the following:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:adms="http://www.w3.org/ns/adms#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:vann="http://purl.org/vocab/vann/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/">
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">value 1</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;my definition of value 1&lt;/p&gt;</skos:definition>
      <!-- ... -->
      <skos:hasTopConcept rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1_1"/>
      <!-- ... -->
   </rdf:Description>
   <!-- ... -->
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">value 1_1</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;definition of value 1_1&lt;/p&gt;</skos:definition>
      <skos:broader rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1"/>
      <!-- ... -->
   </rdf:Description>
</rdf:RDF>

Issue 3
value1 is a skos:Concept, not a skos:ConceptScheme, so the following statement should not be present:

   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1">
      <skos:hasTopConcept rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1/value1_1"/>
   </rdf:Description>

Issue 4

Same as issue 1: the following statement should not be present in the output:

<rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
   </rdf:Description>

Retrieving value1_1 in RDF format gives the following:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:adms="http://www.w3.org/ns/adms#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:vann="http://purl.org/vocab/vann/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/">
   <rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <!-- ... -->
      <rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Dataset"/>
      <skos:inScheme rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
      <!-- ... -->
      <skos:prefLabel xml:lang="en">value 1_1</skos:prefLabel>
      <!-- ... -->
      <skos:definition xml:lang="en">&lt;p&gt;definition of value 1_1&lt;/p&gt;</skos:definition>
      <!-- ... -->
   </rdf:Description>
   <!-- ... -->
</rdf:RDF>

Issue 5

Thet type of value1-1 should be http://www.w3.org/2004/02/skos/core#Dataset, not http://www.w3.org/2004/02/skos/core#Dataset.

Issue 6

Same as issue 1: the following statement should not be present in the output:

<rdf:Description rdf:about="http://hidden_ip_address/hierarki3/kodeliste1/value1_1">
      <skos:topConceptOf rdf:resource="http://hidden_ip_address/hierarki3/kodeliste1"/>
   </rdf:Description>
@oscar9 oscar9 added the Type: Bug Something isn't working label May 9, 2022
@oscar9 oscar9 added this to the v2.3.2 milestone May 24, 2022
@oscar9 oscar9 modified the milestones: v2.3.2, v2.4.0 Jun 29, 2022
@oscar9 oscar9 removed this from the v2.4.0 milestone Oct 4, 2022
@arantzaetxebarria arantzaetxebarria added the under analysis A first analysis is performing label Nov 30, 2022
@arantzaetxebarria arantzaetxebarria added this to the v2.4.1 milestone Nov 30, 2022
@oruscalleda oruscalleda assigned oruscalleda and unassigned unaibrrgn Dec 21, 2022
@oruscalleda oruscalleda modified the milestones: v2.4.1, Next Release Jan 9, 2023
@arantzaetxebarria arantzaetxebarria added ready for testing Solution is ready to test and removed under analysis A first analysis is performing labels Mar 6, 2023
@oruscalleda oruscalleda added solved Solution developed and accepted, not yet deployed and removed ready for testing Solution is ready to test labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants