JSON.LD.Context (JSON-LD.ex v1.0.0)

View Source

Implementation of the JSON-LD 1.1 Context Processing Algorithm.

https://www.w3.org/TR/json-ld11-api/#context-processing-algorithms

Summary

Types

local()

@type local() :: map() | String.t() | nil

remote()

@type remote() :: [map()]

t()

@type t() :: %JSON.LD.Context{
  api_base_iri: String.t() | nil,
  base_direction: String.t() | nil,
  base_iri: String.t() | nil | :not_present,
  default_language: String.t() | nil,
  inverse_context: map() | nil,
  original_base_url: String.t() | nil,
  previous_context: t() | nil,
  term_defs: map(),
  vocabulary_mapping: String.t() | nil
}

Functions

base(context)

@spec base(t()) :: String.t() | nil

create(map, options)

@spec create(map(), JSON.LD.Options.convertible()) :: t()

empty?(arg1)

@spec empty?(t()) :: boolean()

inverse(context)

@spec inverse(t()) :: map()

Inverse Context Creation algorithm

See https://www.w3.org/TR/json-ld11-api/#inverse-context-creation

language(active, term)

@spec language(t(), String.t()) :: String.t() | nil

new(options \\ %Options{})

@spec new(JSON.LD.Options.convertible()) :: t()

set_inverse(context)

@spec set_inverse(t()) :: t()

update(active, local, options \\ [])

@spec update(t(), [local()] | local(), JSON.LD.Options.convertible()) :: t()

update(active, local, options, processor_options)

@spec update(t(), [local()] | local(), keyword(), JSON.LD.Options.convertible()) ::
  t()