View Issue Details

IDProjectCategoryView StatusLast Update
0005614CaseTalk ModelerOtherpublic2026-05-12 09:40
ReporterMarco Wobben Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version15.0 
Summary0005614: Consolidate Turtle export templates and adopt RDF 1.2 idioms
Description

The codebase ships two overlapping Turtle export templates under develop/modules/templates/:

  • ttl.ini ("Turtle (TTL)", 442 lines): rich metadata, PROV-O, VoID, Schema.org alignment heuristics, annotation-property declarations. Bare ":hasArtificialKey"-style predicate naming. Has a few template-syntax bugs (unbalanced parens in the Schema.org alignment block; "@(schema.Tables).Count" emitted mid-Turtle as a literal).

  • ig_turtle_export.ini ("Turtle Export", 352 lines): more modest ontology section but adds SHACL shapes, per-table instance file, and SPARQL query examples. Uses a dedicated tmg: namespace ([url=http://casetalk.com/tmg/schema" rel="noopener]http://casetalk.com/tmg/schema[/url]#) for CaseTalk-specific predicates - much cleaner design.

Goal:

  1. Merge into a single canonical Turtle/RDF export template:
    • Keep ig_turtle_export.ini's tmg: namespace design for CaseTalk predicates.
    • Fold in ttl.ini's PROV-O / VoID / annotation-property declaration blocks.
    • Keep the SHACL + SPARQL + per-table-instance outputs from ig_turtle_export.ini.
    • Fix the template-syntax bugs noted above.
    • Retire the now-duplicate template.
  2. Adopt RDF 1.2 idioms in the consolidated template (Turtle is the natural vehicle - triple terms have no idiomatic RDF/XML):
    • Replace the synthetic :factExpressions / :businessRules string annotations with RDF 1.2 triple terms (<<:Customer :hasReading "Customer places Order">> :assertedBy :CaseTalk).
    • Stop hard-coding "@en"; emit the actual locale from database.Locale or table.Locale.
    • Emit rdf:dirLangString and base direction for RTL locales.

Out of scope: the OwlUnit RDF/XML conceptual-model exporter stays as-is for OTFT-level export. This ticket is about the schema-level Turtle path only.

Parent context: see 0005612 for the broader RDF 1.2 / OwlUnit audit.

TagsNo tags attached.
CaseTalk EditionCorporate

Activities

Marco Wobben

Marco Wobben

2026-05-12 09:40

administrator   ~0006197

Resolved by consolidating the two Turtle templates and adopting RDF 1.2 idioms.

Changes (commit d93f7a439):

  • Single canonical template: develop/modules/templates/ig_turtle_export.ini; ttl.ini retired.
  • Kept ig_turtle_export.ini's tmg: namespace design for CaseTalk-specific predicates (tmg:isRequired, tmg:hasFactExpression, tmg:hasBusinessRule, tmg:isLinkingTable, tmg:hasArtificialKey, tmg:temporal, tmg:tableSource, tmg:columnSource, tmg:constraintSource, ...). All declared as owl:AnnotationProperty.
  • Folded in ttl.ini's strong points: PROV-O provenance block, VoID dataset description, complete annotation-property declarations.
  • Dropped ttl.ini's broken Schema.org alignment heuristics (unbalanced parens) and the @(schema.Tables).Count literal-emission bug.

RDF 1.2 idioms adopted:

  • Verbalisations now attached via triple terms: << :Customer a owl:Class >> tmg:hasFactExpression "Customer places Order" . Replaces the prior synthetic string-blob annotation pattern; no blank-node reification needed.
  • SPARQL example added that traverses the triple-term annotations.
  • BCP 47 / base-direction support documented in a header comment. Default rdfs:label / rdfs:comment language tag is still @en pending a schema-level locale property exposure - flagged at the top of the template so an operator can edit one place to switch.

Output set (all to turtle/):

  • <db>_ontology.ttl (enabled)
  • <db>_shapes.ttl - SHACL shapes (enabled)
  • <db>_queries.rq - SPARQL examples (enabled)
  • <db>_instances.ttl - per-table instance scaffolds (disabled by default)

Issue History

Date Modified Username Field Change
2026-05-12 09:33 Marco Wobben New Issue
2026-05-12 09:40 Marco Wobben Note Added: 0006197
2026-05-12 09:40 Marco Wobben Status new => resolved
2026-05-12 09:40 Marco Wobben Resolution open => fixed
2026-05-12 09:40 Marco Wobben Target Version => 15.0