View Source RDF.Literal.Datatype.Registry (RDF.ex v2.0.0)

Registry of literal datatypes.

Summary

Functions

Checks if the given module is a builtin datatype.

Returns a list of all builtin RDF.Literal.Datatype modules.

Returns a list of all numeric datatype modules.

Returns a list of all builtin RDF.XSD.Datatype modules.

Returns the RDF.Literal.Datatype for a datatype IRI.

Checks if the given module is a builtin datatype or a registered custom datatype implementing the RDF.Literal.Datatype behaviour.

Returns if a given literal or datatype has or is a numeric datatype.

The set of all primitive numeric datatypes.

Returns the RDF.XSD.Datatype for a datatype IRI.

Checks if the given module is a builtin XSD datatype or a registered custom datatype implementing the RDF.XSD.Datatype behaviour.

Functions

Link to this function

builtin_datatype?(module)

View Source
@spec builtin_datatype?(module()) :: boolean()

Checks if the given module is a builtin datatype.

Note: This doesn't include RDF.Literal.Generic.

@spec builtin_datatypes() :: [RDF.Literal.Datatype.t()]

Returns a list of all builtin RDF.Literal.Datatype modules.

Link to this function

builtin_numeric_datatypes()

View Source
@spec builtin_numeric_datatypes() :: [RDF.Literal.Datatype.t()]

Returns a list of all numeric datatype modules.

@spec builtin_xsd_datatypes() :: [RDF.Literal.Datatype.t()]

Returns a list of all builtin RDF.XSD.Datatype modules.

@spec datatype(RDF.Literal.t() | RDF.IRI.t() | String.t()) :: RDF.Literal.Datatype.t()

Returns the RDF.Literal.Datatype for a datatype IRI.

@spec datatype?(RDF.Literal.t() | RDF.Literal.Datatype.literal() | module()) ::
  boolean()

Checks if the given module is a builtin datatype or a registered custom datatype implementing the RDF.Literal.Datatype behaviour.

Link to this function

numeric_datatype?(literal)

View Source
@spec numeric_datatype?(RDF.Literal.t() | RDF.XSD.Datatype.t() | any()) :: boolean()

Returns if a given literal or datatype has or is a numeric datatype.

Link to this function

primitive_numeric_datatypes()

View Source
@spec primitive_numeric_datatypes() :: [RDF.Literal.Datatype.t()]

The set of all primitive numeric datatypes.

@spec xsd_datatype(RDF.Literal.t() | RDF.IRI.t() | String.t()) :: RDF.XSD.Datatype.t()

Returns the RDF.XSD.Datatype for a datatype IRI.

@spec xsd_datatype?(RDF.Literal.t() | RDF.XSD.Datatype.literal() | module()) ::
  boolean()

Checks if the given module is a builtin XSD datatype or a registered custom datatype implementing the RDF.XSD.Datatype behaviour.