AshR2RML.Ggen (AshR2RML v26.8.22)

Copy Markdown View Source

ggen-facing deterministic compilation bundle.

AshR2RML does not invoke ggen or write files. It manufactures a path/content graph so ggen can own rendering, filesystem actuation, migration versioning, replay, and receipts without independently reconstructing semantic decisions.

Turtle and JSON-LD are alternate RDF input serializations. Both are admitted into the same normalized profile before manufacture so ggen never receives a serialization-specific semantic fork.

Cloud ggen may also run in Ash-first mode. In that mode the maintained source is the Ash resource graph itself and compile_ash_ttl_bundle/1 emits the ontology, operational SHACL shapes, and R2RML Turtle required by ggen.

Semantic types use the same boundary: compile_semantic_types_bundle/2 admits a content-addressed plan and returns deterministic generated artifacts. ggen still owns DO.

Summary

Functions

Manufacture cloud-ggen TTL inputs directly from one or more Ash resources.

Parse a JSON-LD 1.1 RDF/SHACL profile, then manufacture the same deterministic ggen bundle.

Manufacture a deterministic ggen path/content graph from a semantic type profile.

Parse an RDF/SHACL Turtle profile, then manufacture the same deterministic ggen bundle.

Functions

compile_ash_ttl_bundle(resources_or_bundle)

@spec compile_ash_ttl_bundle(module() | [module()] | AshR2RML.Mapping.Bundle.t()) ::
  {:ok, map()} | {:error, term()}

Manufacture cloud-ggen TTL inputs directly from one or more Ash resources.

compile_bundle(profile)

@spec compile_bundle(map()) ::
  {:ok, map()} | {:error, AshR2RML.Compilation.t() | term()}

compile_jsonld_bundle(jsonld, opts \\ [])

@spec compile_jsonld_bundle(
  String.t() | map() | list(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Parse a JSON-LD 1.1 RDF/SHACL profile, then manufacture the same deterministic ggen bundle.

compile_semantic_types_bundle(source, opts \\ [])

@spec compile_semantic_types_bundle(
  term(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Manufacture a deterministic ggen path/content graph from a semantic type profile.

compile_turtle_bundle(turtle, opts \\ [])

@spec compile_turtle_bundle(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Parse an RDF/SHACL Turtle profile, then manufacture the same deterministic ggen bundle.