Author a Prototype Graph¶
DataStack enriches data by filling prototype graphs. A prototype graph is a semantic template — a Turtle file that describes the structure of any process, experiment, analysis routine, or workflow. When real data flows through the pipeline, DataStack instantiates that template: every data row becomes a concrete set of connected entities shaped like the prototype.
This page shows how to author prototype graphs using Ontosphere, a browser-based RDF/OWL 2 DL editor. No installation required.
If a prototype graph for your use case already exists in your community's ontology library (e.g. the PMDCO pattern library), you can skip directly to Author a Mapping.
What is a prototype graph?¶
A prototype graph is a reusable Turtle file that defines the semantic structure of a real-world process or concept — an experiment, a measurement, an analysis routine, a script workflow, a material characterisation step. It specifies what entities are involved, what their types are, and how they relate to each other.
The pipeline uses prototype graphs as enrichment templates: the mapping rules (authored in MapToMethod) connect your resource metadata (CSVW) to the named slots in the prototype. When RDFConverter runs, every row in your data fills those slots with real values — producing a knowledge graph where each data point is connected to the semantic context the prototype graph defines.
A prototype graph can represent anything where you have a repeating structure that real data should fill:
- a tensile test (specimen → measurement process → yield strength value)
- a microscopy acquisition (instrument → settings → image → sample)
- an analysis script run (input dataset → algorithm → output result)
- a material composition (alloy → constituent elements → weight fractions)
A minimal prototype graph for a length measurement looks like this:
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix iof: <https://spec.industrialontologies.org/ontology/core/Core/> .
@prefix qual: <https://spec.industrialontologies.org/ontology/qualities/> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix unit: <http://qudt.org/vocab/unit/> .
<LengthMeasurement> a owl:Ontology .
:Specimen a owl:NamedIndividual, iof:MaterialArtifact .
:SpecimenLength a owl:NamedIndividual, qual:Length .
:MeasurementProcess a owl:NamedIndividual, iof:MeasurementProcess .
:LengthData a owl:NamedIndividual, qudt:QuantityValue ;
qudt:unit unit:MilliM .
The owl:NamedIndividual entries are the named slots — the data entry points of the prototype. The mapping you author later defines the rules between these slots and the resource metadata (CSVW): which column fills which slot.
Ontosphere¶
Ontosphere is a zero-install, browser-based RDF/OWL 2 DL editor. It works with any RDF — loading ontologies, exploring knowledge graphs, running inference, validating shapes. Here we use it specifically for authoring prototype graphs; its scope is broader than that.
It combines a visual graph canvas (Reactodia), an in-browser triple store (N3.js), and a full OWL 2 DL reasoner compiled to WebAssembly (Konclude). No backend, no account.
Overview video¶
For a 3-minute walkthrough of all features: iswc2026-comprehensive.mp4
Authoring workflow¶
The standard prototype graph authoring sequence:
1 — Load your base ontology¶
Open Ontosphere. In the Load panel, enter the URL of your target ontology (e.g. PMDCO, MTO, EMMO) or upload a local TTL file. Ontosphere loads the class hierarchy and property definitions from the ontology — these become available as types when you create nodes.
You can also load from a SPARQL endpoint if your ontology is published there.
2 — Build the graph: add nodes and links¶
Switch to the Authoring tab. For each entity in your prototype graph:
- Add a node — drag a class from the ontology panel onto the canvas, or use New Node and set its type IRI manually
- Name it — give it a local name (e.g.
Specimen,YieldStrengthDatum) — this becomes the named individual IRI slot MapToMethod links to - Draw edges — drag from one node's connection port to another; set the property IRI (e.g.
obo:RO_0000080— inheres in)
Use Run Layout (Dagre or ELK) after adding nodes to automatically arrange the graph readably.
3 — Explore and verify structure¶
Use the TBox / ABox toggle to switch between the ontology class hierarchy (TBox) and your instance graph (ABox). The search bar finds any node by IRI or label. Use the minimap for large graphs.
4 — Run OWL 2 DL reasoning¶
Click Run Reasoning. Konclude checks your prototype graph for OWL 2 DL consistency and adds any entailed relationships as amber dashed edges — these are inferred triples not present in your source, derived from the ontology axioms. If a node is unsatisfiable (contradictory classification), the reasoner flags it here.
Fix any unsatisfiabilities before exporting — an inconsistent prototype graph will produce incorrect RDF downstream.
5 — SHACL validation (optional)¶
If your community provides SHACL shapes (e.g. PMDCO ships shapes for its core prototype graphs), load them in the Validation panel. Ontosphere runs the shapes against your graph and highlights which nodes fail which constraints, with repair suggestions.
6 — Export the TTL¶
Export Graph → Turtle (.ttl). The export uses W3C RDFC-1.0 canonicalization — the output is deterministic and diff-friendly.
Upload the exported TTL to a publicly accessible URL (GitHub, public S3, institution web server). MapToMethod fetches the prototype graph by URL — it must be reachable over HTTP.
Materials science benchmark tasks¶
The OntoAuthor-Mat benchmark provides six materials science prototype graph tasks with reference solutions, SHACL shapes, and SPARQL competency questions. Use them to learn the core OWL 2 DL structures before authoring your own:
| Task | OWL construct | Scenario |
|---|---|---|
| T1 | rdfs:subClassOf |
Steel alloy classification hierarchy |
| T2 | owl:someValuesFrom |
Composite materials and their constituents |
| T3 | owl:allValuesFrom |
Certified material supplier constraints |
| T4 | owl:disjointWith |
Metallic vs. ceramic material categories |
| T5 | owl:sameAs |
Consolidating duplicate material entries |
| T6 | Unsatisfiability | Contradictory classification detection |
Each task directory contains a natural-language brief, the reference OWL 2 DL solution, SHACL shapes (shapes.ttl), and SPARQL competency questions. Work through T1 and T2 first — they cover the two structures that appear in most materials science measurement prototype graphs.
What the exported TTL must contain¶
For MapToMethod to use your prototype graph, the exported TTL must include:
| Requirement | Why |
|---|---|
At least one owl:NamedIndividual |
These are the link targets — MapToMethod binds CSV columns to named individual IRIs |
A qudt:unit annotation on quantity nodes |
CSVToCSVW's unit detection aligns with QUDT; the prototype graph must agree |
| Publicly accessible URL | MapToMethod fetches the TTL over HTTP — local or intranet files are not reachable |
The named individual IRI is the slot key: in the mapping step you will pair your CSV column name to this IRI.
Next step¶
Once your prototype graph TTL is at a public URL:
→ Author a Mapping — define the rules between your resource metadata (CSVW) and the prototype graph's named individual slots using MapToMethod.