netwerk-digitaal-erfgoed / requirements-datasets

Requirements for datasets
https://netwerk-digitaal-erfgoed.github.io/requirements-datasets/
1 stars 0 forks source link

Describe SPARQL endpoint #46

Open ddeboer opened 2 years ago

ddeboer commented 2 years ago

Add example SPARQL and other queries (such as an HTTP URL to an OAI-PMH endpoint) to help users discover the data in the datasets.

For datasets that share a SPARQL endpoint, the information should include the way to select the dataset from that generic endpoint. We may use SPARQL Service Description for this:

[] a sd:Service ;
    sd:endpoint <http://www.example/sparql/> ;
        sd:namedGraph [
            a sd:NamedGraph ;
            sd:name <http://www.example/named-graph> ;
        ]
    ] .

An alternative approach is to use SHACL SPARQL targets:

ex:USCitizenShape
    a sh:NodeShape ;
    sh:target [
        a sh:SPARQLTarget ;
        sh:prefixes ex: ;
        sh:select """
            SELECT ?this
            WHERE {
                ?this a ex:Person .
                ?this ex:bornIn ex:USA .
            }
            """ ;
    ] ;
    ...