# `RDF.Literal.Datatype.Registry`
[🔗](https://github.com/rdf-elixir/rdf-ex/blob/v3.0.1/lib/rdf/model/literal/datatype/registry.ex#L1)

Registry of literal datatypes.

# `builtin_datatype?`

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

Checks if the given module is a builtin datatype.

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

# `builtin_datatypes`

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

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

# `builtin_numeric_datatypes`

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

Returns a list of all numeric datatype modules.

# `builtin_xsd_datatypes`

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

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

# `datatype`

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

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

# `datatype?`

```elixir
@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?`

```elixir
@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`

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

The set of all primitive numeric datatypes.

# `xsd_datatype`

```elixir
@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?`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
