An implementation of the W3C Data Catalog Vocabulary (DCAT) - Version 3 vocabulary for Elixir as Grax schemas.
The API documentation can be found here. For more information about the RDF on Elixir projects, go to https://rdf-elixir.dev.
- The
DCAT
module acts as theRDF.Vocabulary.Namespace
for the DCAT vocabulary - Grax structures for all DCAT classes and their properties, for easy creation and manipulation of data catalogs, datasets, and data services
- Seamless integration with all RDF on Elixir projects
Add dcat
to your list of dependencies in mix.exs
:
def deps do
[
{:dcat, "~> 0.1"}
]
end
DCAT.Dataset.build!(EX.my_dataset(),
title: "My Dataset",
description: "This is a sample dataset",
release_date: Date.utc_today(),
publishers: [EX.my_org()],
keywords: ["sample", "dataset", "example"],
themes: [EX.sample_theme()]
)
|> Grax.to_rdf!(prefixes: [dcat: DCAT, ex: EX, xsd: RDF.NS.XSD, dct: DCAT.NS.DCTerms])
|> RDF.Turtle.write_string!()
produces:
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
ex:my_dataset
a dcat:Dataset ;
dct:title "My Dataset" ;
dct:description "This is a sample dataset" ;
dct:issued "2024-08-06"^^xsd:date ;
dct:publisher ex:my_org ;
dcat:keyword "dataset", "example", "sample" ;
dcat:theme ex:sample_theme .
See CONTRIBUTING for details.
If you need help with your Elixir and Linked Data projects, just contact NinjaConcept via [email protected].
(c) 2024 Marcel Otto. MIT Licensed, see LICENSE for details.