DCAT is an ontology from W3C to describe datasets in the semantic web. It is supported by software such as CKAN, GeoNetwork. The geodcat-ap group has developed a specialisation of DCAT v1 to describe spatial datasets. Many of the conventions of geodcat-ap have been introduced in follow-up editions of DCAT (v2, v3).
- Standard: https://www.w3.org/ns/dcat
- GeoDCAT-AP: https://semiceu.github.io/GeoDCAT-AP
- Good Paractice: https://inspire.ec.europa.eu/good-practice/geodcat-ap
Ontologies used in DCAT
DCAT makes use of other ontologies, following the best practices of the Semantic Web. They are all relevant to produce consistent and usable meta-data for the web.
vCard: For the description of People and Organisations according to the specification issued by the Internet Engineering Task Force (IETF) (RFC6350). Also considers addresses, communication means and inter-personal relations.
Dublin Core: A small ontology implementing the fifteen element ISO 15836-1:2017 standard for documentation meta-data. The ontology expands on the original Dublin Core with additional terms meant to facilitate meta-data creation and publication with RDF.
PROV-O: An OWL translation of the Prov Data Model specified by the W3C. Provides a set of classes, properties, and restrictions that can be used to represent and interchange provenance information.
Query a DCAT resource
The query below provides an example of how to interact with a knowledge graph of metadata making use of the DCAT ontology. It returns a list of datasets tagged with keywords containing the string “soil”. The data property dcat:keyword
was originally meant exclusively for instances of the dcat:Dataset
class, but since version 2 of the ontology it can be used with any class.
- Follow the virtuoso/skosmos recipe up to step
On the linked data tab, select Quad store upload.
Instead of adding a remote url you unzip and upload a rdf snapshot of the dutch spatial catalogue. - Navigate to http://localhost:8890/sparql/ and run the query below.
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?dataset, ?title
WHERE {
?dataset a dcat:Dataset ;
dct:title ?title ;
dcat:keyword ?keyword .
FILTER CONTAINS(?keyword, "EIGEN") .
}
The CONTAINS
function in the query above is used to partially match the string. For an exact match the equals operator can be used instead (=
). To match more than one keyword, successive FILTER
clauses can be concatenated with the or operator (||
).
If at some point your database is corrupt, you can remove all triples by running:
DELETE FROM DB.DBA.RDF_QUAD ;
Colin Maundry provides some dcat sample sparql queries. Notice that you replace the graph url http://www.data.maudry.com/uk
in the queries with yours.