RDF.Literal.Generic (RDF.ex v0.8.2) View Source
A generic RDF.Literal.Datatype
for literals of an unknown datatype.
Link to this section Summary
Functions
Returns the canonical lexical form of a RDF.Literal
of this datatype.
Since generic literals don't support casting, always returns nil
.
Checks if the given literal has this datatype.
Checks if two datatype literals are equal in terms of the values of their value space.
Updates the value of a RDF.Literal
without changing everything else.
Link to this section Types
Specs
Link to this section Functions
Returns the canonical lexical form of a RDF.Literal
of this datatype.
Specs
cast(RDF.Literal.Datatype.literal() | RDF.Term.t()) :: RDF.Literal.t() | nil
Since generic literals don't support casting, always returns nil
.
Specs
compare(RDF.Literal.t() | any(), RDF.Literal.t() | any()) :: RDF.Literal.Datatype.comparison_result() | :indeterminate | nil
Checks if the given literal has this datatype.
Checks if two datatype literals are equal in terms of the values of their value space.
Non-RDF.Literal
s are tried to be coerced via RDF.Literal.coerce/1
before comparison.
Returns nil
when the given arguments are not comparable as literals of this
datatype.
Invalid literals are only considered equal in this relation when both have the exact same datatype and the same attributes (lexical form, language etc.).
Implementations can customize this equivalence relation via the RDF.Literal.Datatype.do_equal_value_different_datatypes?/2
and RDF.Literal.Datatype.do_equal_value_different_datatypes?/2
callbacks.
Updates the value of a RDF.Literal
without changing everything else.