View Source RDF.BlankNode.Generator.Random (RDF.ex v2.0.1)

An implementation of a RDF.BlankNode.Generator.Algorithm which returns RDF.BlankNodes with random identifiers.

Note, although this generator is faster than the RDF.BlankNode.Generator.UUID generator, which also produces random identifiers, the random identifiers produced by RDF.BlankNode.Generator.Random are not unique across multiple application runs, since they are based on numbers returned by :erlang.unique_integer/1.

Summary

Functions

Creates a struct with the state of the algorithm.

Types

@type t() :: %RDF.BlankNode.Generator.Random{map: map(), prefix: String.t()}

Functions

Creates a struct with the state of the algorithm.

Options

  • prefix: a string prepended to the generated blank node identifier