RDF.Literal.Datatype.Registry (RDF.ex v2.1.0)

View Source

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

builtin_datatype?(module)

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

Checks if the given module is a builtin datatype.

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

builtin_datatypes()

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

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

builtin_numeric_datatypes()

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

Returns a list of all numeric datatype modules.

builtin_xsd_datatypes()

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

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

datatype(literal)

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

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

datatype?(value)

@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.

numeric_datatype?(literal)

@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.

primitive_numeric_datatypes()

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

The set of all primitive numeric datatypes.

xsd_datatype(id)

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

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

xsd_datatype?(value)

@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.