Inferal Ontologies Ontosome by Inferal

Inside a module

Every module is a self-contained vocabulary publication. The full set of files a module can ship:

ontology.ttl
The core vocabulary. Classes, properties, axioms, human labels (rdfs:label), and definitions (rdfs:comment). This is the authoritative source for the module's terms. The module's IRI matches the URL it is published at.
shapes.ttl
SHACL shapes that constrain valid instance data. Use them with any SHACL validator (Apache Jena, pySHACL, rdf4j, TopBraid) to check that data using the vocabulary obeys the module's stated constraints.
examples.ttl
Worked instance data showing how the vocabulary is meant to be used. Useful as fixtures, as input to your own validators, or as documentation by example.
spec/
The rendered ReSpec specification – the human-readable reference for the module. Term definitions, motivating examples, design notes, and citations. Start here when reading a module for the first time.
queries/
SPARQL queries that either define semantics (used inside SHACL or rule layers) or exercise the vocabulary against examples. Queries are module-local and named for what they do.

Not every module ships every file. Modules without instance-level constraints may omit shapes; modules without procedural semantics may omit queries.

Stable, versioned URLs

Each module is published at two paths. The choice between them is the choice between following a moving target and pinning to a fixed point.

/modules/<id>/current/
Tracks the latest published version. Use this for exploration, for development, or when you actively want to follow the module's evolution. The contents of this path change when a new version is published; URLs under it are not safe to cite.
/modules/<id>/versions/<version>/
An immutable snapshot. Once a version is published, the files under this path will not change. Use these URLs when you need stability: in code that depends on a specific vocabulary version, in citations, in cached fixtures.

Both paths serve identical files at the moment a version is published. The artifact pinned at versions/<v>/ is the same artifact current/ pointed at when <v> was the head.

Version semantics

Each module declares its version inside ontology.ttl via owl:versionInfo. Versions follow semantic versioning:

  • Major bumps for backwards-incompatible changes – a term is removed, its IRI moves, or its meaning changes in a way that invalidates existing data.
  • Minor bumps for additive changes – new classes, properties, or constraints that do not invalidate existing data.
  • Patch bumps for clarifications and editorial fixes – labels, comments, and examples; no normative change.

Same URL, two audiences

Turtle files at this site serve different representations depending on what the client asks for. The URL is the same; the body differs.

Defaults

Open a Turtle URL such as /modules/versioning/current/ontology.ttl in a browser and the server returns a syntax-highlighted view with line numbers, a copy button, and a download button. Send Accept: text/turtle from an RDF client and the server returns the raw Turtle document – no HTML wrapping.

Forcing a representation

Two query parameters override content negotiation:

?raw
Always serves the raw Turtle, regardless of Accept. Useful for testing in a browser without changing headers.
?download
Same as ?raw, plus a Content-Disposition: attachment header so the browser saves the file instead of rendering it.

Link relations

Each Turtle response includes an HTTP Link header pointing to related resources:

  • rel="version" – the pinned-version URL for the artifact you just fetched.
  • rel="canonical" – the current/ URL.
  • rel="describedby" – the rendered spec page.

Tools that follow Link headers can move between these forms without parsing HTML.

Programmatic access

Everything published here is plain HTTP. Common patterns:

Fetch raw Turtle

curl -H 'Accept: text/turtle' \
  https://ontology.inferal.com/modules/versioning/0.1.0/ontology.ttl

Load into rdflib (Python)

from rdflib import Graph

g = Graph()
g.parse(
    "https://ontology.inferal.com/modules/versioning/0.1.0/ontology.ttl",
    format="turtle",
)

Validate with pySHACL

pyshacl \
  -s https://ontology.inferal.com/modules/versioning/0.1.0/shapes.ttl \
  data.ttl

Browse catalog graphs

Catalogs are available as Turtle browsers: catalog ontology, Inferal-authored source, external imports, and Relay API imports. Use them to inspect catalog triples, follow ontology IRIs, or switch to raw Turtle with ?raw.