GND (Gemeinsame Normdatei) scheme.
Summary
Functions
Builds a URI for the given GND.
Checks whether a string is a GND.
Normalizes a GND.
Checks whether a string starts with a GND prefix.
Functions
Builds a URI for the given GND.
Examples
iex> IDUtils.Schemes.GND.build_uri("118823574")
{:ok, %URI{scheme: "https", host: "d-nb.info", path: "/gnd/118823574", port: 443}}
Checks whether a string is a GND.
Examples
iex> IDUtils.Schemes.GND.match?("118634313")
true
iex> IDUtils.Schemes.GND.match?("4028557-1")
true
Normalizes a GND.
Examples
iex> IDUtils.Schemes.GND.normalize("http://d-nb.info/gnd/119404923")
{:ok, "119404923"}
iex> IDUtils.Schemes.GND.normalize("gnd:4030318-4")
{:ok, "4030318-4"}
iex> IDUtils.Schemes.GND.normalize("40303184")
{:error, :invalid_identifier}
Checks whether a string starts with a GND prefix.
Examples
iex> IDUtils.Schemes.GND.prefix?("https://d-nb.info/gnd/118634313")
true
iex> IDUtils.Schemes.GND.prefix?("gnd:118634313")
true
iex> IDUtils.Schemes.GND.prefix?("118634313")
false