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

Link to this section Summary

Link to this section Functions

Link to this function

absolute_iri(value, base_iri)

View Source
@spec 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

@spec 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 _:


Link to this function

compact_iri_parts(compact_iri, exclude_bnode \\ true)

View Source
@spec compact_iri_parts(String.t(), boolean()) :: [String.t()] | nil
@spec index?(map() | nil) :: boolean()
@spec list?(map() | nil) :: boolean()
@spec relative_iri?(String.t()) :: boolean()
@spec scalar?(any()) :: boolean()
@spec value?(map() | nil) :: boolean()