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
fn with_default(iri: IRIRef) -> Self where
Self: Sized,
[src]
fn with_default(iri: IRIRef) -> Self where
Self: Sized,
[src]Construct a new mapping instance with the provided default namespace.
fn get_default_namespace(&self) -> Option<&IRIRef>
[src]
fn get_default_namespace(&self) -> Option<&IRIRef>
[src]Get the default namespace mapping, if present.
fn set_default_namespace(&mut self, iri: IRIRef)
[src]
fn set_default_namespace(&mut self, iri: IRIRef)
[src]Set the default namespace mapping.
fn get_namespace(&self, prefix: &str) -> Option<&IRIRef>
[src]
fn get_namespace(&self, prefix: &str) -> Option<&IRIRef>
[src]Get the namespace IRI associated with this provided prefix, if present.
fn get_prefix(&self, namespace: &IRIRef) -> Option<&String>
[src]
fn get_prefix(&self, namespace: &IRIRef) -> Option<&String>
[src]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.
Provided methods
fn include_xsd(&mut self)
[src]
fn include_xsd(&mut self)
[src]Include the common “xsd” (XML Schema Data types) mapping.
fn include_rdf(&mut self)
[src]
fn include_rdf(&mut self)
[src]Include the common “rdf” mapping.
fn include_rdfs(&mut self)
[src]
fn include_rdfs(&mut self)
[src]Include the common “rdfs” mapping.