#rdf #namespaces #vocabularies

rdf_vocabularies

This crate is a distribution of few most commonly used RDF vocabularies. It also provides sophia terms for each vocabulary's terminology.

11 releases

0.2.0 Jul 5, 2023
0.1.9 Mar 24, 2023
0.1.8 Sep 28, 2022
0.1.7 Feb 5, 2022
0.1.6 Jan 27, 2022

#1209 in Database interfaces

Download history 32/week @ 2024-07-21 84/week @ 2024-07-28 29/week @ 2024-08-04 35/week @ 2024-08-11 18/week @ 2024-08-18 51/week @ 2024-08-25 30/week @ 2024-09-01 20/week @ 2024-09-08 21/week @ 2024-09-15 54/week @ 2024-09-22 36/week @ 2024-09-29 8/week @ 2024-10-06 18/week @ 2024-10-13 16/week @ 2024-10-20 14/week @ 2024-10-27 13/week @ 2024-11-03

62 downloads per month
Used in 13 crates (8 directly)

MIT/Apache

3MB
781 lines

rdf_vocabularies

This crate is a distribution of few most commonly used RDF vocabularies. It also provides sophia terms for each vocabulary's terminology.

For each vocabulary with prefix vocab_prefix, it provides a module rdf_vocabularies::ns::{vocab_prefix}, that provides sophia terms for entities defined in that vocab's namespace. These modules are behind cargo features `ns-{vocab_prefix}respectively for each vocab. This way you can include only required vocabularies.

Please check documentation for included vocabularies, and their terms. These are generated from their ontologies, and also includes doc-comments for quick reference.

Usage

Include the crate in your project dependencies, with features corresponding to required ontologies

[dependencies]
# includes namespaces for vocabularies `rdf`, `foaf`, `solid`.
rdf_vocabularies = { version = "0.2.0", features=["ns-rdf", "ns-foaf", "ns-solid"] }

And then use them.

use rdf_vocabularies::{ns::{rdf, foaf, solid}};
use sophia_api::prelude::*;

assert!(Term::eq(&foaf::Agent, &Iri::new_unchecked("http://xmlns.com/foaf/0.1/Agent")));
assert!(Term::eq(&rdf::subject, &Iri::new_unchecked("http://www.w3.org/1999/02/22-rdf-syntax-ns#subject")));

License: MIT OR Apache-2.0

Dependencies

~3–4.5MB
~88K SLoC