This is a collection of experiments with SPARQL. Herein you can find examples of:
- Data validation of an input source against vocabulary data.
- Data expansion, using RDFS/OWL rules implemented with SPARQL CONSTRUCT (instead of reasoner algorithms).
- Data curation, combining vocabulary data with common patterns and idioms.
Most of these queries are designed to run against a dataset containing:
- the default graph, providing background knowledge (mostly vocabulary data);
- one named graph, representing the focal data to work with.
A bunch of scripts in the
tools directory can be used to run these queries
locally, against either local or remote data sources.
$ tools/construct.py QUERY_FILE DEFAULT_SOURCE NAMED_SOURCE
$ groovy tools/construct.groovy QUERY_FILE DEFAULT_SOURCE NAMED_SOURCE
Of course, you can also use e.g. Jena ARQ to run queries directly. Usage:
$ arq --query QUERY_FILE --graph DEFAULT_SOURCE --namedGraph NAMED_SOURCE