DCATR (DCAT-R.ex v0.1.0)

Copy Markdown View Source

A framework for services over RDF repositories that implements the DCAT-R specification.

What is DCAT-R?

DCAT-R (DCAT for RDF Repositories) is an OWL vocabulary extending DCAT 3 for representing RDF datasets as hierarchical catalog structures. It is designed primarily for building specialized RDF repository services - systems that provide operations (versioning, validation, inference, API access) over datasets. While DCAT-R can also be useful for simpler use cases like cataloging or organizing read-only data, its full power emerges when extended to create custom service types with domain-specific operations and supporting infrastructure.

How does DCAT-R extend DCAT?

  1. Domain specialization: While DCAT is designed for cataloging data generally, DCAT-R applies DCAT's catalog model specifically to RDF 1.1 datasets - cataloging the individual graphs within RDF datasets rather than arbitrary data files.

  2. Service as configuration: While DCAT treats dcat:DataService primarily as a catalogable metadata object, DCAT-R uses it as configuration for implementing services. A DCAT-R service is not just described by metadata; it IS the runtime configuration that service implementations use to provide operations.

Core Concepts

DCAT-R organizes RDF repositories through a multi-layer catalog hierarchy:

DCAT-R Overview

Service Layer

The operations layer - what you can DO with the data. Services define and implement operations like querying, committing changes, validating, or transforming data. A service aggregates both distributable repository data and local instance-specific configuration.

See DCATR.Service for details.

Repository Layer

The distributable data catalog - global/static content that can be replicated across service instances. Contains the dataset (user data) plus metadata and optional distributed system graphs (e.g., history, provenance, shared indexes).

See DCATR.Repository for details.

ServiceData Layer

The local data catalog - instance-specific data that is never distributed. Contains service manifests (configuration), working graphs (temporary/draft data), and optional local system graphs (e.g., caches, logs, local indexes).

See DCATR.ServiceData for details.

Dataset Layer

The pure user data catalog - free from operational concerns. A dataset is simply a catalog of data graphs, always contained within a repository and always distributed.

See DCATR.Dataset for details.

Graph Taxonomy

DCAT-R defines a complete taxonomy of graph types. Every graph belongs to exactly one of four disjoint classes:

DataGraph

Primary user data - the actual content of the dataset. Always contained in the dataset catalog, always distributed with the repository.

See DCATR.DataGraph for details.

ManifestGraph

Configuration that DCAT-R understands and processes. Contains DCAT-R-specific metadata like graph name mappings and service settings. Two concrete types:

  • RepositoryManifestGraph: Repository metadata (distributed)
  • ServiceManifestGraph: Service configuration (local)

See DCATR.ManifestGraph for details.

SystemGraph

Infrastructure data supporting service operations. Can be deployed in two modes:

  • Distributed (in Repository): History, provenance, shared indexes
  • Local (in ServiceData): Caches, logs, local indexes

See DCATR.SystemGraph for details.

WorkingGraph

Temporary/draft data for service-local operations. Always in ServiceData, never distributed. Analogous to a working directory in version control systems.

See DCATR.WorkingGraph for details.

Primary Graph

DCAT-R supports designating a primary graph in two ways:

  • dcatr:repositoryDataGraph - for single-graph repositories (provides both containment and designation)
  • dcatr:repositoryPrimaryGraph - for multi-graph repositories (pure designator, no containment)

See DCATR.Repository for details.

Manifest System

Services are typically loaded from RDF manifest files via DCATR.Manifest, which provides hierarchical, environment-aware configuration loading. See DCATR.Manifest for details.

Extending DCAT-R

DCAT-R provides extension points for building specialized service types, from simple cataloging to complex operational services. The framework is designed primarily for the latter - building specialized services - but remains useful for simpler cases without extension.

Extension Pattern

When building specialized services, the extension pattern is:

  1. Define operations - What can users DO with the data? (commit, validate, transform, query, etc.)
  2. Define SystemGraphs - What infrastructure do operations need? (history, caches, indexes, etc.)
  3. Implement via Type behaviours - Custom types for Service, Repository, and/or ServiceData

Example: A versioning service (like Ontogen) defines commit operations, which require history graphs (distributed SystemGraphs). A validation service defines validation operations, which may need validation report graphs (could be distributed or local).

The complete technical pattern is documented in DCATR.Service.Type.

Key Extension Points

Further Reading

Summary

Functions

Returns the configured manifest type for the application.

Functions

dataGraph()

See DCATR.NS.DCATR.dataGraph/0.

dataGraph(subject)

See DCATR.NS.DCATR.dataGraph/1.

dataGraph(subject, objects)

See DCATR.NS.DCATR.dataGraph/2.

directory()

See DCATR.NS.DCATR.directory/0.

directory(subject)

See DCATR.NS.DCATR.directory/1.

directory(subject, objects)

See DCATR.NS.DCATR.directory/2.

localGraphName()

See DCATR.NS.DCATR.localGraphName/0.

localGraphName(subject)

See DCATR.NS.DCATR.localGraphName/1.

localGraphName(subject, objects)

See DCATR.NS.DCATR.localGraphName/2.

manifest(opts \\ [])

See DCATR.Manifest.manifest/1.

manifest!(opts \\ [])

See DCATR.Manifest.manifest!/1.

manifest_type()

Returns the configured manifest type for the application.

Applications with custom manifest types (implementing DCATR.Manifest.Type) can set this in their config to use their manifest type as the default in tasks like mix dcatr.init.

Example

# config/config.exs
config :dcatr, :manifest_type, MyApp.Manifest

manifestService()

See DCATR.NS.DCATR.manifestService/0.

manifestService(subject)

See DCATR.NS.DCATR.manifestService/1.

manifestService(subject, objects)

See DCATR.NS.DCATR.manifestService/2.

member()

See DCATR.NS.DCATR.member/0.

member(subject)

See DCATR.NS.DCATR.member/1.

member(subject, objects)

See DCATR.NS.DCATR.member/2.

parentDirectory()

See DCATR.NS.DCATR.parentDirectory/0.

parentDirectory(subject)

See DCATR.NS.DCATR.parentDirectory/1.

parentDirectory(subject, objects)

See DCATR.NS.DCATR.parentDirectory/2.

repository(opts \\ [])

See DCATR.Manifest.repository/1.

repository!(opts \\ [])

See DCATR.Manifest.repository!/1.

repositoryDataGraph()

See DCATR.NS.DCATR.repositoryDataGraph/0.

repositoryDataGraph(subject)

See DCATR.NS.DCATR.repositoryDataGraph/1.

repositoryDataGraph(subject, objects)

See DCATR.NS.DCATR.repositoryDataGraph/2.

repositoryDataset()

See DCATR.NS.DCATR.repositoryDataset/0.

repositoryDataset(subject)

See DCATR.NS.DCATR.repositoryDataset/1.

repositoryDataset(subject, objects)

See DCATR.NS.DCATR.repositoryDataset/2.

repositoryManifestGraph()

See DCATR.NS.DCATR.repositoryManifestGraph/0.

repositoryManifestGraph(subject)

See DCATR.NS.DCATR.repositoryManifestGraph/1.

repositoryManifestGraph(subject, objects)

See DCATR.NS.DCATR.repositoryManifestGraph/2.

repositoryPrimaryGraph()

See DCATR.NS.DCATR.repositoryPrimaryGraph/0.

repositoryPrimaryGraph(subject)

See DCATR.NS.DCATR.repositoryPrimaryGraph/1.

repositoryPrimaryGraph(subject, objects)

See DCATR.NS.DCATR.repositoryPrimaryGraph/2.

repositorySystemGraph()

See DCATR.NS.DCATR.repositorySystemGraph/0.

repositorySystemGraph(subject)

See DCATR.NS.DCATR.repositorySystemGraph/1.

repositorySystemGraph(subject, objects)

See DCATR.NS.DCATR.repositorySystemGraph/2.

service(opts \\ [])

See DCATR.Manifest.service/1.

service!(opts \\ [])

See DCATR.Manifest.service!/1.

serviceLocalData()

See DCATR.NS.DCATR.serviceLocalData/0.

serviceLocalData(subject)

See DCATR.NS.DCATR.serviceLocalData/1.

serviceLocalData(subject, objects)

See DCATR.NS.DCATR.serviceLocalData/2.

serviceManifestGraph()

See DCATR.NS.DCATR.serviceManifestGraph/0.

serviceManifestGraph(subject)

See DCATR.NS.DCATR.serviceManifestGraph/1.

serviceManifestGraph(subject, objects)

See DCATR.NS.DCATR.serviceManifestGraph/2.

serviceRepository()

See DCATR.NS.DCATR.serviceRepository/0.

serviceRepository(subject)

See DCATR.NS.DCATR.serviceRepository/1.

serviceRepository(subject, objects)

See DCATR.NS.DCATR.serviceRepository/2.

serviceSystemGraph()

See DCATR.NS.DCATR.serviceSystemGraph/0.

serviceSystemGraph(subject)

See DCATR.NS.DCATR.serviceSystemGraph/1.

serviceSystemGraph(subject, objects)

See DCATR.NS.DCATR.serviceSystemGraph/2.

serviceWorkingGraph()

See DCATR.NS.DCATR.serviceWorkingGraph/0.

serviceWorkingGraph(subject)

See DCATR.NS.DCATR.serviceWorkingGraph/1.

serviceWorkingGraph(subject, objects)

See DCATR.NS.DCATR.serviceWorkingGraph/2.

usePrimaryAsDefault()

See DCATR.NS.DCATR.usePrimaryAsDefault/0.

usePrimaryAsDefault(subject)

See DCATR.NS.DCATR.usePrimaryAsDefault/1.

usePrimaryAsDefault(subject, objects)

See DCATR.NS.DCATR.usePrimaryAsDefault/2.