[−][src]Trait rome::graph::GraphWriter
Trait for writing into a graph.
Associated Types
type BlankNode: Clone
The blank node type that is accepted by this writer.
type IRI: Clone
The IRI type that is accepted by this writer.
type Literal
The literal type that is accepted by this writer.
type Datatype: Clone
The datatype type that is accepted by this writer.
type Language
The language type that is accepted by this writer.
type Graph: Graph<'g>
The type of the graph into which this writer writes.
Required Methods
fn create_blank_node(&mut self) -> Self::BlankNode
Create a new blank node for the graph.
fn create_iri<'a, I: 'a>(&mut self, _: &I) -> Self::IRI where
I: IRIPtr<'a>,
I: IRIPtr<'a>,
Create a new IRI from an existing IRI for the graph.
fn create_literal<'a, L: 'a>(&mut self, _: &L) -> Self::Literal where
L: LiteralPtr<'a>,
L: LiteralPtr<'a>,
Create a new literal from an existing literal for the graph.
fn create_datatype(&mut self, _: &str) -> Self::Datatype
Create a new datatype for the graph.
fn create_language(&mut self, _: &str) -> Self::Language
Create a new language for the graph.
fn create_literal_datatype(
&mut self,
value: &str,
datatype: &Self::Datatype
) -> Self::Literal
&mut self,
value: &str,
datatype: &Self::Datatype
) -> Self::Literal
Create a new literal with the given datatype for the graph.
fn create_literal_language(
&mut self,
value: &str,
language: &Self::Language
) -> Self::Literal
&mut self,
value: &str,
language: &Self::Language
) -> Self::Literal
Create a new literal with the given language for the graph.
fn add_blank_blank(
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
object: &Self::BlankNode
)
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
object: &Self::BlankNode
)
Add a new triple with blank node as subject and object to the graph.
fn add_blank_iri(
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
object: &Self::IRI
)
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
object: &Self::IRI
)
Add a new triple with a blank node as subject and an IRI as object to the graph.
fn add_blank_literal(
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
bject: &Self::Literal
)
&mut self,
subject: &Self::BlankNode,
predicate: &Self::IRI,
bject: &Self::Literal
)
Add a new triple with a blank node as subject and a literal as object to the graph.
fn add_iri_blank(
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::BlankNode
)
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::BlankNode
)
Add a new triple with an IRI as subject and a blank node as object to the graph.
fn add_iri_iri(
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::IRI
)
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::IRI
)
Add a new triple with an IRI as subject and an IRI as object to the graph.
fn add_iri_literal(
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::Literal
)
&mut self,
subject: &Self::IRI,
predicate: &Self::IRI,
object: &Self::Literal
)
Add a new triple with an IRI as subject and a literal as object to the graph.
fn collect(self) -> Self::Graph
Close the GraphWriter and return the resulting graph.
Provided Methods
fn add(
&mut self,
subject: &WriterBlankNodeOrIRI<'g, Self>,
predicate: &Self::IRI,
object: &WriterResource<'g, Self>
) where
Self: Sized,
&mut self,
subject: &WriterBlankNodeOrIRI<'g, Self>,
predicate: &Self::IRI,
object: &WriterResource<'g, Self>
) where
Self: Sized,
Add a new triple to the graph.