skohub-io / skohub-vocabs

A lightweight tool to publish SKOS Vocabularies
https://skohub.io/
Apache License 2.0
32 stars 25 forks source link

Match-Elements missing in generated index.json #286

Closed lummerland closed 5 months ago

lummerland commented 6 months ago

While doing tests to prepare a SkoHub upgrade I noticed, that in the generated index.json file there are no more *Match-Elements left. broadMatch, relatedMatch, exactMatch in my case. As example I take https://github.com/openeduhub/oeh-metadata-vocabs/blob/master/graduation.ttl:

@base <http://w3id.org/openeduhub/vocabs/graduation/> .
@prefix dct: <http://purl.org/dc/terms/>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix kim: <https://w3id.org/kim/schulabschluesse/> .
@prefix gnd: <https://d-nb.info/gnd/> .
@prefix gndo: <https://d-nb.info/standards/elementset/gnd#> .
@prefix wd: <http://www.wikidata.org/entity/> .

<> a skos:ConceptScheme;
    dct:title "Abschluss"@de;
    dct:title "Graduation"@en;
    dct:description "Eine Wertelliste für schulische und Hochschulabschlüsse. Entstanden im Kontext des OpenEduHub."@de;
    dct:creator "<https://wirlernenonline.de>" ;
    dct:created "2022-10-11"^^xsd:date;
    dct:modified "2022-10-11"^^xsd:date; 
    dct:license <http://creativecommons.org/publicdomain/zero/1.0/> ;
    skos:hasTopConcept <ohne_schulabschluss>, <erster_allgemeinbildender_schulabschluss>, <mittlerer_schulabschluss>, 
        <fachhochschulreife>, <fachgebundene_hochschulreife>, <allgemeine_hochschulreife>,
        <bachelor>, <master>, <promotion> .

<ohne_schulabschluss> a skos:Concept ;
    skos:prefLabel "Ohne Schulabschluss"@de ;
    skos:exactMatch kim:cf42a778-3982-4f27-8b9a-92e5875342c0 ;
    skos:topConceptOf <> .

...

In our current version the generated index.json contains:

{
            "id": "http://w3id.org/openeduhub/vocabs/graduation/ohne_schulabschluss",
            "prefLabel": {
                "de": "Ohne Schulabschluss"
            },
            "exactMatch": [
                {
                    "id": "https://w3id.org/kim/schulabschluesse/cf42a778-3982-4f27-8b9a-92e5875342c0"
                }
            ]
}

In the new version it changed to this:

{
            "id": "http://w3id.org/openeduhub/vocabs/graduation/ohne_schulabschluss",
            "prefLabel": {
                "de": "Ohne Schulabschluss"
            }
},

Did I miss something ... ?

Thanks & regards!

sroertgen commented 6 months ago

I think they were never present in the original skohub-vocabs versions. ircc we added them to OEH for specific purposes.

You might have to add them somewhere beneath here: https://github.com/skohub-io/skohub-vocabs/blob/1d2af17cc076e3097ac4eb7d3898e29e0070ca10/src/queries.js#L163

Like

exactMatch {
  id
  }
lummerland commented 6 months ago

Oh, okay. Good to know ;) Thanks, will try that!

sroertgen commented 5 months ago

Will close this for now. Feel free toreopen if it does not work.