[][src]Trait rome::graph::GraphWriter

pub trait GraphWriter<'g> {
    type BlankNode: Clone;
    type IRI: Clone;
    type Literal;
    type Datatype: Clone;
    type Language;
    type Graph: Graph<'g>;
    fn create_blank_node(&mut self) -> Self::BlankNode;
fn create_iri<'a, I: 'a>(&mut self, _: &I) -> Self::IRI
    where
        I: IRIPtr<'a>
;
fn create_literal<'a, L: 'a>(&mut self, _: &L) -> Self::Literal
    where
        L: LiteralPtr<'a>
;
fn create_datatype(&mut self, _: &str) -> Self::Datatype;
fn create_language(&mut self, _: &str) -> Self::Language;
fn create_literal_datatype(
        &mut self,
        value: &str,
        datatype: &Self::Datatype
    ) -> Self::Literal;
fn create_literal_language(
        &mut self,
        value: &str,
        language: &Self::Language
    ) -> Self::Literal;
fn add_blank_blank(
        &mut self,
        subject: &Self::BlankNode,
        predicate: &Self::IRI,
        object: &Self::BlankNode
    );
fn add_blank_iri(
        &mut self,
        subject: &Self::BlankNode,
        predicate: &Self::IRI,
        object: &Self::IRI
    );
fn add_blank_literal(
        &mut self,
        subject: &Self::BlankNode,
        predicate: &Self::IRI,
        bject: &Self::Literal
    );
fn add_iri_blank(
        &mut self,
        subject: &Self::IRI,
        predicate: &Self::IRI,
        object: &Self::BlankNode
    );
fn add_iri_iri(
        &mut self,
        subject: &Self::IRI,
        predicate: &Self::IRI,
        object: &Self::IRI
    );
fn add_iri_literal(
        &mut self,
        subject: &Self::IRI,
        predicate: &Self::IRI,
        object: &Self::Literal
    );
fn collect(self) -> Self::Graph; fn add(
        &mut self,
        subject: &WriterBlankNodeOrIRI<'g, Self>,
        predicate: &Self::IRI,
        object: &WriterResource<'g, Self>
    )
    where
        Self: Sized
, { ... } }

Trait for writing into a graph.

Associated Types

The blank node type that is accepted by this writer.

The IRI type that is accepted by this writer.

The literal type that is accepted by this writer.

The datatype type that is accepted by this writer.

The language type that is accepted by this writer.

The type of the graph into which this writer writes.

Required Methods

Create a new blank node for the graph.

Create a new IRI from an existing IRI for the graph.

Create a new literal from an existing literal for the graph.

Create a new datatype for the graph.

Create a new language for the graph.

Create a new literal with the given datatype for the graph.

Create a new literal with the given language for the graph.

Add a new triple with blank node as subject and object to the graph.

Add a new triple with a blank node as subject and an IRI as object to the graph.

Add a new triple with a blank node as subject and a literal as object to the graph.

Add a new triple with an IRI as subject and a blank node as object to the graph.

Add a new triple with an IRI as subject and an IRI as object to the graph.

Add a new triple with an IRI as subject and a literal as object to the graph.

Close the GraphWriter and return the resulting graph.

Provided Methods

Add a new triple to the graph.

Implementors