Skip to content

Instantly share code, notes, and snippets.

@cecemel
Last active August 25, 2022 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecemel/6954c71ff575d5fee44df0bcd8fde22d to your computer and use it in GitHub Desktop.
Save cecemel/6954c71ff575d5fee44df0bcd8fde22d to your computer and use it in GitHub Desktop.

general info

  • the database should be accessible on http://ipdc-test-ldes-sparql.abb-croco.s.redhost.be:8890/sparql -> mind http:// here
  • the application should be accessible on https://ipdc-test-ldes.abb-croco.s.redhost.be/mock-login (choose a gemeente)
    • it would be a nice user test if you could navigate to the correct module etc. :-), I am sure you will manage.
    • note: currently, only one ConceptualPublicService is available, created by us. Since the data is not correctly parsed yet, nothing will show up in the frontend. Once issues are fixed, it should start populating
    • LDES-consumer polls every minute
    • LDES-consumer only keeps the latest snapshot
    • In the database, you can already find what we have so far; see queries.

queries

Query: check everything ingested by the ldes-consumer

CONSTRUCT {
  ?s ?p ?o
}
{
  GRAPH <http://mu.semte.ch/graphs/lpdc/ldes-data> {
    ?s ?p ?o
  }
}

Tip: set Results Format: 'Turtle ... beautified'. If there are not too many results, you can click around on the resources. -> else choose another format Tip: always uncheck 'Strict checking of void variables'

query check for a specific subject

CONSTRUCT {
  ?s ?p ?o
}
{
  BIND(<https://ipdc.ipdc.tni-vlaanderen.be/api/conceptsnapshots/69e9625c-3053-4a09-b184-fc112cc9ac93> as ?s)
  GRAPH <http://mu.semte.ch/graphs/lpdc/ldes-data> {
    ?s ?p ?o
  }
}

query for the versions of a resource

CONSTRUCT {
  ?s ?p ?o
}
{
  BIND(<https://ipdc.ipdc.tni-vlaanderen.be/api/concepten/87aeaacf-cc7c-4539-ac75-8c6f13a25fac> as ?resource)
  GRAPH <http://mu.semte.ch/graphs/lpdc/ldes-data> {
    ?s ?p ?o;
       <http://purl.org/dc/terms/isVersionOf>  ?resource.
  }
}

snapshot subjects ordered by time

SELECT DISTINCT ?s ?modified {
  GRAPH <http://mu.semte.ch/graphs/lpdc/ldes-data> {
    ?s <http://www.w3.org/ns/prov#generatedAtTime> ?modified.
  }
}
ORDER BY DESC(?modified)

Tip: for select queries, set results format to HTML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment