Theory — Deployment
From medacore.ttl to a production endpoint
Triplestore — GraphDB Free
We picked GraphDB Free (Ontotext). Reasons:
- Built-in OWL 2 RL/QL and OWL 2 RL+SH reasoning configs.
- Native SHACL endpoint (
/rest/shacl). - SPARQL 1.1 + Graph Store HTTP Protocol out of the box.
- Decent admin UI for the PV team's ontology engineer.
Alternatives we considered: Apache Jena Fuseki (great, but reasoner config is finickier), Stardog (commercial, expensive at our scale), Blazegraph (unmaintained).
Repository layout
Two named graphs in the same repo:
<https://w3id.org/medacore/onto/0.3.0>— the ontology (read-mostly).<https://w3id.org/medacore/data/current>— the instance data (frequently updated).
Why named graphs? So we can wipe and reload the data graph without ever risking the ontology graph.
CI/CD
A GitHub Actions workflow runs on every PR to medacore-onto/:
pyshacl medacore.ttl shapes.ttl data-sample.ttl— SHACL conforms.robot reason --reasoner HermiT medacore.ttl --output classified.ttl— DL classification produces no unsatisfiable classes.robot diff --left previous.ttl --right medacore.ttl— diff posted to the PR for human review.- On merge to
main: tag a newvX.Y.Z, render docs with Widoco, push to S3 behind the PURL.
FAIR publishing
The PURL https://w3id.org/medacore/onto/0.3.0 is configured on w3id.org (community redirect service) to respond to content negotiation:
Accept: text/turtle→ the.ttlfile on S3.Accept: application/rdf+xml→ the RDF/XML rendering.Accept: text/html→ the Widoco-rendered docs.
That trio + a dcterms:license triple is what makes the ontology Findable, Accessible, Interoperable and Reusable — the FAIR principles in one sentence.