Struct curie::PrefixMapping [] [src]

pub struct PrefixMapping {
    // some fields omitted
}

Maps prefixes to base URIs and allows for the expansion of CURIEs (Compact URIs).

Methods

impl PrefixMapping
[src]

fn set_default(&mut self, default: &str)

Set a default prefix.

This is used during CURIE expansion when there is no prefix, just a reference value.

fn add_prefix(&mut self, prefix: &str, value: &str) -> Result<()InvalidPrefixError>

Add a prefix to the mapping.

This allows this prefix to be resolved when a CURIE is expanded.

fn remove_prefix(&mut self, prefix: &str)

Remove a prefix from the mapping.

Future calls to expand_curie_string or expand_curie that use this prefix will result in a ExpansionError::Invalid error.

fn expand_curie_string(&self, curie: &str) -> Result<StringExpansionError>

Expand a CURIE, returning a complete IRI.

fn expand_curie(&self, curie: &Curie) -> Result<StringExpansionError>

Expand a parsed Curie, returning a complete IRI.

Trait Implementations

impl Default for PrefixMapping
[src]

fn default() -> PrefixMapping

Returns the "default value" for a type. Read more