Trait rdftk_core::model::graph::mapping::PrefixMappings[][src]

pub trait PrefixMappings: Debug {
Show methods fn with_default(iri: IRIRef) -> Self
    where
        Self: Sized
;
fn is_empty(&self) -> bool;
fn len(&self) -> usize;
fn get_default_namespace(&self) -> Option<&IRIRef>;
fn set_default_namespace(&mut self, iri: IRIRef);
fn get_namespace(&self, prefix: &str) -> Option<&IRIRef>;
fn get_prefix(&self, namespace: &IRIRef) -> Option<&String>;
fn mappings<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = (&'a String, &'a IRIRef)> + 'a>;
fn insert(&mut self, prefix: &str, iri: IRIRef);
fn remove(&mut self, prefix: &str);
fn clear(&mut self);
fn expand(&self, qname: &QName) -> Option<IRIRef>;
fn compress(&self, iri: &IRIRef) -> Option<QName>; fn include_xsd(&mut self) { ... }
fn include_rdf(&mut self) { ... }
fn include_rdfs(&mut self) { ... }
}
Expand description

Prefix mappings are used in the serialization of graphs.

Required methods

Construct a new mapping instance with the provided default namespace.

Returns true if there are no mappings in this instance, else false.

Return the number of mappings in this instance.

Get the default namespace mapping, if present.

Set the default namespace mapping.

Get the namespace IRI associated with this provided prefix, if present.

Get the prefix associated with this provided namespace URI, if present.

Return an iterator over the contained mappings.

Insert a mapping from the prefix string to the namespace IRI.

Remove a mapping for the provided prefix. This operation has no effect if no mapping is present.

Remove all mappings from this instance.

Expand a qname into an IRI, if possible.

Compress an IRI into a qname, if possible.

Provided methods

Include the common “xsd” (XML Schema Data types) mapping.

Include the common “rdf” mapping.

Include the common “rdfs” mapping.

Implementors