# `IDUtils.Schemes.RAID`
[🔗](https://github.com/moefuerst/id_utils/blob/v0.1.0/lib/id_utils/schemes/raid.ex#L1)

RAID (Research Activity Identifier) scheme.

See https://documentation.raid.org/raid

> #### RAID and DOI {: .info}
> RAID registration agencies issue RAIDs [as DOIs via
> DataCite](https://support.datacite.org/docs/raids), reusing the DOI `10.xxxx/yyyy`
> namespace. RAID and a DOI are therefore format-identical; the only reliable disambiguator is a
> possible `https://raid.org/` resolver prefix.
>
> Since every RAID is a DOI, but not every DOI is a RAID and DOIs are much more common, IDUtils
> prefers DOI over RAID when both are detected.

# `build_uri`

Builds a URI for the given RAID.

## Examples

    iex> IDUtils.Schemes.RAID.build_uri("10.1234/abc123")
    {:ok, %URI{scheme: "https", host: "raid.org", path: "/10.1234/abc123", port: 443}}

# `match?`

Checks whether a string can be matched as a RAID.

## Examples

    iex> IDUtils.Schemes.RAID.match?("10.5281/zenodo.15293455")
    true

    iex> IDUtils.Schemes.RAID.match?("https://raid.org/10.5281/zenodo.15293455")
    true

    iex> IDUtils.Schemes.RAID.match?("not-a-raid")
    false

# `normalize`

Normalizes a RAID.

## Examples

    iex> IDUtils.Schemes.RAID.normalize("10.5281/zenodo.15293455")
    {:ok, "10.5281/zenodo.15293455"}

    iex> IDUtils.Schemes.RAID.normalize("https://raid.org/10.1000.10/foo-bar")
    {:ok, "10.1000.10/foo-bar"}

    iex> IDUtils.Schemes.RAID.normalize("not-a-raid")
    {:error, :invalid_identifier}

# `prefix?`

```elixir
@spec prefix?(binary()) :: boolean()
```

Checks whether a string starts with a RAID prefix.

## Examples

    iex> IDUtils.Schemes.RAID.prefix?("https://raid.org/10.5281/zenodo.15293455")
    true

    iex> IDUtils.Schemes.RAID.prefix?("10.5281/zenodo.15293455")
    false

---

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