iolanta:visualizes property
-
Domain
np:Assertion
An assertion graph inside a nanopublication -
Range
owl:Ontology
The ontology this assertion describes how to render
iolanta:visualizes links a nanopublication assertion to the ontology whose visualization metadata it carries. The triple lives in the nanopublication's provenance graph, not its assertion graph: the assertion describes how to group an ontology's terms (using vann:termGroup), while the provenance says which ontology that assertion is about.
Iolanta uses iolanta:visualizes at render time to discover community-published visualization information for any ontology, without that information having to be bundled in the Iolanta repository. See the related ADR: Publish visualization information for ontologies on ….
Discovery flow
On the first Iolanta.render() call for each Iolanta instance, Iolanta queries the public Knowledge Pixels nanopub registry for all signed, non-invalidated, non-superseded visualization nanopublications, loads their assertion graphs into the local dataset, and caches the resulting nanopub URL list for one day on disk (cashews @cache.soft under ~/.cache/iolanta/visualization-index/). Later renders on the same instance reuse the loaded graphs; nanopub documents are HTTP-cached separately by yaml-ld via requests-cache. If a registry refresh fails, Iolanta falls back to stale cached URLs when available; otherwise it logs a warning and continues without remote visualizations. Pass --without-visualization-cache-index to the CLI to always refresh the URL list from the registry while still updating the disk cache. The grouping triples (vann:termGroup, rdfs:label) then become visible to the regular ontology-rendering SPARQL used by MkDocsOntologyFacet and OntologyFacet.
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX np: <http://www.nanopub.org/nschema#>
PREFIX npx: <http://purl.org/nanopub/x/>
PREFIX npa: <http://purl.org/nanopub/admin/>
PREFIX iolanta: <https://iolanta.tech/>
SELECT DISTINCT ?nanopub ?target ?created WHERE {
GRAPH npa:graph {
?nanopub np:hasAssertion ?assertion ;
np:hasProvenance ?provenance ;
npa:hasValidSignatureForPublicKey ?pubkey ;
dcterms:created ?created .
}
GRAPH ?provenance {
?assertion iolanta:visualizes ?target .
}
FILTER NOT EXISTS {
GRAPH npa:graph {
?invalidator npx:invalidates ?nanopub ;
npa:hasValidSignatureForPublicKey ?invalidator_pubkey .
}
}
FILTER NOT EXISTS {
GRAPH npa:graph {
?newer npx:supersedes ?nanopub ;
npa:hasValidSignatureForPublicKey ?newer_pubkey .
}
}
}
ORDER BY DESC(?created)
Iolanta loads all active matches from this index, not only the latest nanopublication per ontology. If multiple signed nanopublications visualize the same ontology, their assertion graphs are all loaded.
The discovery code lives in iolanta/discovery/visualization_nanopublications.py.
Authoring overlays
Files under docs/visualizations/ are published to https://iolanta.tech/visualizations/ as static MkDocs assets. Iolanta does not load them at runtime. To make an overlay discoverable, sign a visualization nanopublication whose provenance contains iolanta:visualizes pointing at the target ontology.
Cache control
The registry URL list is cached for one day under ~/.cache/iolanta/visualization-index/. Delete that directory to force a cold start on the next render. Pass --without-visualization-cache-index to the iolanta CLI to skip reading the disk cache on a given run while still writing a fresh result.
Example
The current grouping for the rdf: namespace is loaded from https://w3id.org/np/RAXhiZMoa3JldEhxcgVyp8UIJL_N0PhEJpCTRXdKl7H_Q. Its provenance graph contains, in essence:
"@context":
iolanta: https://iolanta.tech/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
$id: "_:assertion"
iolanta:visualizes:
$id: "rdf:"
…and its assertion graph contains the vann:termGroup triples that produce the Datatype / Language / Triples / Compound Literal / Containers / Properties / Value groups visible on the RDF reference page.