Skip to content

Commit 9c41346

Browse files
authored
Merge pull request #37 from AdaWorldAPI/claude/phase-2a-ogar-adapter-ttl-scaffold
feat(ogar-adapter-ttl): scaffold Turtle (RDF/OWL) adapter — Phase 2a
2 parents b74ed43 + 04493de commit 9c41346

4 files changed

Lines changed: 675 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ jobs:
4242
# self-describing-registry loop (ADR-023 receipt).
4343
- name: cargo test -p ogar-knowable-from --features surrealql-hint
4444
run: cargo test -p ogar-knowable-from --features surrealql-hint
45+
# Exercise the `ttl-parser` feature on ogar-adapter-ttl — pulls
46+
# in oxttl / oxrdf for Turtle parsing. The emit path is feature-
47+
# free, but the round-trip tests need the parser.
48+
- name: cargo test -p ogar-adapter-ttl --features ttl-parser
49+
run: cargo test -p ogar-adapter-ttl --features ttl-parser

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ members = [
77
"crates/ogar-adapter",
88
"crates/ogar-proposal",
99
"crates/ogar-adapter-surrealql",
10+
"crates/ogar-adapter-ttl",
1011
"crates/ogar-knowable-from",
1112
]
1213

crates/ogar-adapter-ttl/Cargo.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[package]
2+
name = "ogar-adapter-ttl"
3+
version.workspace = true
4+
edition.workspace = true
5+
license.workspace = true
6+
repository.workspace = true
7+
authors.workspace = true
8+
rust-version.workspace = true
9+
description = "Bidirectional Turtle (RDF/OWL) bridge for OGAR. emit_ttl(Class, prefix) renders a canonical OGAR Turtle document by composing ogar-emitter's TripleEmitter output; parse_ttl (behind the `ttl-parser` feature) consumes Turtle via oxttl and lifts back into Vec<Class>. Companion to ogar-adapter-surrealql; together they cover the Morris-syntax axis for OGAR's two canonical wire formats (per docs/RDF-OWL-ALIGNMENT.md Phase 2a)."
10+
11+
[features]
12+
default = []
13+
serde = ["dep:serde", "ogar-vocab/serde"]
14+
# Enable Turtle parsing (oxttl). Emit is feature-free — it's a
15+
# straightforward Turtle serialization of ogar-emitter::TripleEmitter
16+
# triples. Parsing requires the full oxttl streaming parser.
17+
ttl-parser = ["dep:oxttl", "dep:oxrdf"]
18+
19+
[dependencies]
20+
ogar-vocab = { path = "../ogar-vocab" }
21+
ogar-emitter = { path = "../ogar-emitter" }
22+
ogar-ontology = { path = "../ogar-ontology" }
23+
serde = { workspace = true, optional = true }
24+
# Wired under the `ttl-parser` feature. oxttl is the oxigraph project's
25+
# streaming Turtle/N-Triples/N-Quads/TriG parser — pure Rust, RFC-
26+
# compliant, low dep footprint. oxrdf gives the typed Term/Triple
27+
# values oxttl yields.
28+
oxttl = { version = "0.2", optional = true }
29+
# oxrdf 0.3 matches oxttl 0.2.3's transitive version — both must
30+
# agree or Term/Subject types collide at the lift seam.
31+
oxrdf = { version = "0.3", optional = true }

0 commit comments

Comments
 (0)