JSON.LD.Utils (JSON-LD.ex v0.3.3) View Source

Link to this section Summary

Link to this section Functions

Link to this function

absolute_iri(value, base_iri)

View Source

Specs

absolute_iri(String.t(), String.t() | nil) :: RDF.IRI.coercible() | nil

Resolves a relative IRI against a base IRI.

as specified in section 5.1 Establishing a Base URI of RFC3986. Only the basic algorithm in section 5.2 of RFC3986 is used; neither Syntax-Based Normalization nor Scheme-Based Normalization are performed.

Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per section 6.5 of RFC3987

Specs

blank_node_id?(String.t()) :: boolean()

Checks if the given value is a blank node identifier.

A blank node identifier is a string that can be used as an identifier for a blank node within the scope of a JSON-LD document.

Blank node identifiers begin with _:

see https://www.w3.org/TR/json-ld-api/#dfn-blank-node-identifier

Link to this function

compact_iri_parts(compact_iri, exclude_bnode \\ true)

View Source

Specs

compact_iri_parts(String.t(), boolean()) :: [String.t()] | nil

Specs

index?(map() | nil) :: boolean()

Specs

list?(map() | nil) :: boolean()

Specs

relative_iri?(String.t()) :: boolean()

Specs

scalar?(any()) :: boolean()

Specs

value?(map() | nil) :: boolean()