maplib vocabulary¶
Namespace: https://datatreehouse.github.io/maplib/vocab#
This page documents the custom IRIs that maplib mints and uses internally: custom SPARQL
functions and the built-in OTTR templates. It is the dereferenceable home for these
terms: each term below has a stable HTML anchor that matches its IRI fragment, so a URL
like https://datatreehouse.github.io/maplib/vocab#uuidv5 resolves directly to its
documentation.
Namespace migration in progress
The current build mints these terms under https://github.com/DataTreehouse/maplib#.
To make the IRIs dereferenceable at the docs site, the library should mint them under
the …github.io/maplib/vocab# namespace above (or a redirect should be set up from the
old namespace). See the notes for maintainers at the bottom.
A machine-readable version of this vocabulary is available as Turtle:
vocab.ttl.
Functions¶
Custom SPARQL functions usable in query, insert, and update. Call them by their full
IRI (or a registered prefix) in a BIND or FILTER.
maplib:uuidv5¶
Generates deterministic UUIDs based on namespace and name.
PREFIX maplib: <https://datatreehouse.github.io/maplib/vocab#>
SELECT * WHERE {
VALUES ?name {"a" "b" UNDEF}
BIND(maplib:uuidv5("url", ?name) AS ?v5)
}
| IRI | https://datatreehouse.github.io/maplib/vocab#uuidv5 |
| Kind | SPARQL function |
| Arguments | (xsd:string), (xsd:string) |
| Returns | An IRI |
maplib:struuidv5¶
Generates a string that is the scheme specific part of UUID based on namespace and name.
PREFIX maplib: <https://datatreehouse.github.io/maplib/vocab#>
SELECT * WHERE {
VALUES ?name {"a" "b" UNDEF}
BIND(maplib:struuidv5("url", ?name) AS ?sv5)
}
| IRI | https://datatreehouse.github.io/maplib/vocab#struuidv5 |
| Kind | SPARQL function |
| Arguments | (xsd:string), (xsd:string) |
| Returns | The scheme specific part of UUID as an xsd:string |
Templates¶
Built-in OTTR templates maplib uses when it materialises results (e.g. SHACL reports). You can reference these in your own templates or expect them in generated output.
maplib:ShaclReportTemplate¶
The OTTR template maplib uses to serialise a SHACL validation report into RDF.
| IRI | https://datatreehouse.github.io/maplib/vocab#ShaclReportTemplate |
| Kind | OTTR template |
maplib:ShaclResultTemplate¶
The OTTR template maplib uses to serialise an individual SHACL validation result (a single violation) into RDF.
| IRI | https://datatreehouse.github.io/maplib/vocab#ShaclResultTemplate |
| Kind | OTTR template |
Notes for maintainers¶
To make every term on this page dereferenceable (resolve an IRI → its docs):
- Align the namespace. Mint these IRIs under
https://datatreehouse.github.io/maplib/vocab#in the library, or publish an HTTP redirect from the oldgithub.com/...maplib#namespace to this page. - Keep anchors exact. Each term heading uses
{ #ExactFragment }(via theattr_listextension) so the HTMLidmatches the IRI fragment case-sensitively. Material would otherwise lowercase the slug and break#decodeString. - This page should be generated. Like the API reference (built from
__init__.pyi), the term list here should ideally be generated from the library's registry of custom functions/templates rather than hand-maintained, so it never drifts. The<!-- TODO -->marker shows where the remaining functions go in the meantime. - Offer machine-readable RDF.
vocab.ttldescribes the vocabulary in Turtle. Note that GitHub Pages can't do content negotiation, so trueAccept-based dereferencing (HTML for browsers, Turtle for tools) would need a small server or aw3id.org-style redirect; the.ttllink is the static-hosting fallback.