AshR2RML.SemanticType (AshR2RML v26.8.22)

Copy Markdown View Source

Canonical admitted value-space projection.

A semantic type is deliberately independent of Ash source, PostgreSQL DDL, R2RML syntax, JSON-LD syntax, Igniter patches, and ggen templates. Those are projections of this object.

Summary

Types

representation()

@type representation() ::
  :builtin
  | :new_type
  | :custom_type
  | :registry
  | :composite
  | :embedded
  | :jsonb
  | :resource

t()

@type t() :: %AshR2RML.SemanticType{
  ash_type: atom() | module(),
  class_iri: String.t() | nil,
  concept_scheme_iri: String.t() | nil,
  constraints: keyword() | map(),
  datatype_iri: String.t() | nil,
  id: String.t() | nil,
  name: atom(),
  postgres_type: String.t() | nil,
  provenance: map(),
  provider: atom() | nil,
  representation_candidates: [representation()],
  selected_representation: representation() | nil,
  semantic_kind: AshR2RML.Type.semantic_kind(),
  shacl_constraints: keyword() | map(),
  source_iri: String.t() | nil,
  storage_type: atom() | term() | nil
}

Functions

absolute_iri?(value)

@spec absolute_iri?(term()) :: boolean()

canonical(type)

@spec canonical(t()) :: map()

hash(type)

@spec hash(t()) :: String.t()

new(attrs)

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