AshR2RML.SemanticTypes (AshR2RML v26.8.22)

Copy Markdown View Source

Pure SELECT/CONSTRUCT compiler for public-ontology semantic value spaces.

Inputs may be public IRIs, a list of IRI/profile entries, or a JSON-compatible map containing types. All paths converge on AshR2RML.SemanticType.Plan.

This module performs no filesystem writes, migrations, network access, or production actuation.

Summary

Functions

admit_property(type, ash_type)

@spec admit_property(AshR2RML.SemanticType.t(), atom() | module()) ::
  :ok | {:error, AshR2RML.Refusal.t()}

compile(source, opts \\ [])

@spec compile(
  term(),
  keyword()
) :: {:ok, [AshR2RML.SemanticType.t()]} | {:error, [AshR2RML.Refusal.t()]}

diff(expected, observed)

iri_type(opts \\ [])

@spec iri_type(keyword()) ::
  {:ok, AshR2RML.SemanticType.t()} | {:error, AshR2RML.Refusal.t()}

Construct an explicit RDF IRI semantic type without inventing an ontology class.

manifest(plan)

@spec manifest(AshR2RML.SemanticType.Plan.t()) :: map()

manifest_json(plan)

@spec manifest_json(AshR2RML.SemanticType.Plan.t()) ::
  {:ok, String.t()} | {:error, Jason.EncodeError.t()}

plan(source, opts \\ [])

@spec plan(
  term(),
  keyword()
) :: {:ok, AshR2RML.SemanticType.Plan.t()} | {:error, [AshR2RML.Refusal.t()]}

providers(opts \\ [])

@spec providers(keyword()) :: [module()]

resolve(iri, opts \\ [])

@spec resolve(
  String.t(),
  keyword()
) :: {:ok, AshR2RML.SemanticType.t()} | {:error, AshR2RML.Refusal.t()}

round_trip(type, value)

@spec round_trip(AshR2RML.SemanticType.t(), term()) ::
  {:ok, map()} | {:error, AshR2RML.Refusal.t()}

verify(types)

@spec verify(AshR2RML.SemanticType.Plan.t() | [AshR2RML.SemanticType.t()]) ::
  :ok | {:error, [AshR2RML.Refusal.t()]}