DCAT 3.0 Core
The W3C Data Catalog Vocabulary (DCAT) is an RDF vocabulary designed to facilitate interoperability between data catalogs published on the Web.
Overview
DCAT 3.0 provides the core vocabulary for describing:
Datasets - Collections of data
Distributions - Specific representations of datasets
Data Services - APIs providing access to data
Catalogs - Collections of metadata about resources
Official Specification: https://www.w3.org/TR/vocab-dcat-3/
Core Classes
The DCAT 3.0 implementation includes 9 core classes:
Resource - Base class for all cataloged resources (16 properties)
Dataset - Collection of data published by a single agent
Distribution - Specific representation of a dataset
DataService - Collection of operations providing access to datasets
Catalog - Curated collection of metadata about resources
CatalogRecord - Metadata about a dataset’s entry in a catalog
DatasetSeries - Collection of datasets published separately
Relationship - Association between datasets
Role - Function of an entity with respect to another resource
Quick Example
from dartfx.dcat import Catalog, Dataset, Distribution
# Create catalog
catalog = Catalog(id="open-data-portal")
catalog.add_title("Open Data Portal", lang="en")
catalog.add_description("Central catalog for open datasets", lang="en")
catalog.add_publisher("http://example.org/government")
# Create dataset
dataset = Dataset(id="population-2024")
dataset.add_title("Population Statistics 2024", lang="en")
dataset.add_description("Annual population data", lang="en")
dataset.add_keyword("population")
dataset.add_keyword("statistics")
dataset.add_license("http://creativecommons.org/licenses/by/4.0/")
# Create distribution
distribution = Distribution(id="csv-dist")
distribution.add_download_url("http://example.org/data.csv")
distribution.add_media_type("text/csv")
# Link everything
dataset.add_distribution(distribution)
catalog.add_dataset(dataset)
# Serialize to RDF
turtle = catalog.to_rdf(format='turtle')
RDF Serialization
DCAT supports multiple RDF serialization formats:
# Turtle
turtle = dataset.to_rdf(format='turtle')
# RDF/XML
xml = dataset.to_rdf(format='xml')
# JSON-LD
jsonld = dataset.to_rdf(format='json-ld')
# N-Triples
ntriples = dataset.to_rdf(format='nt')
Multilingual Support
DCAT supports language-tagged literals:
dataset.add_title("Population Data", lang="en")
dataset.add_title("Données de population", lang="fr")
dataset.add_title("Bevölkerungsdaten", lang="de")
dataset.add_description("Annual statistics", lang="en")
dataset.add_description("Statistiques annuelles", lang="fr")
Features
✅ Pydantic Models - Type-safe with automatic validation
✅ RDF Native - Full serialization/deserialization
✅ Helper Methods - Convenient add_* methods for all properties
✅ Multilingual - Language-tagged literals
✅ Extensible - Easy to extend for application profiles
Testing
The DCAT 3.0 implementation includes 38 comprehensive tests:
# Run all DCAT tests
pytest tests/test_dcat.py -v
# Run with coverage
pytest tests/test_dcat.py --cov=dartfx.dcat.dcat
Compliance
This implementation is fully compliant with:
✅ W3C DCAT Version 3.0
✅ RDF 1.1
✅ Dublin Core Terms
✅ FOAF vocabulary
✅ SPDX vocabulary
See Also
DCAT-US 3.0 - DCAT-US Implementation
DCAT-AP 3.0.1 - DCAT-AP Implementation
DCAT_IMPLEMENTATION.md - Complete implementation guide