[][src]Trait rome::graph::Graph

pub trait Graph<'g> {
    type BlankNodePtr: BlankNodePtr<'g> + Ord + Clone + 'g;
    type IRIPtr: IRIPtr<'g> + Ord + Clone + 'g;
    type LiteralPtr: LiteralPtr<'g> + Ord + Clone;
    type SPOTriple: Triple<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr> + Ord + Clone;
    type SPOIter: SortedIterator<Item = Self::SPOTriple>;
    type SPORangeIter: SortedIterator<Item = Self::SPOTriple>;
    type OPSTriple: Triple<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr> + Ord + Clone;
    type OPSRangeIter: SortedIterator<Item = Self::OPSTriple>;
    fn iter(&'g self) -> Self::SPOIter;
fn find_datatype<'a>(
        &'g self,
        datatype: &'a str
    ) -> Option<<Self::LiteralPtr as LiteralPtr<'g>>::DatatypePtr>;
fn find_iri<'a>(&'g self, iri: &'a str) -> Option<Self::IRIPtr>;
fn find_literal<'a>(
        &'g self,
        literal: &'a str,
        datatype: &'a str,
        language: Option<&'a str>
    ) -> Option<Self::LiteralPtr>;
fn iter_s(
        &'g self,
        subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>
    ) -> Self::SPORangeIter;
fn iter_s_p(
        &'g self,
        subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>,
        predicate: &Self::IRIPtr
    ) -> Self::SPORangeIter;
fn iter_o(
        &'g self,
        object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>
    ) -> Self::OPSRangeIter;
fn iter_o_p(
        &'g self,
        object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>,
        predicate: &Self::IRIPtr
    ) -> Self::OPSRangeIter;
fn empty_spo_range(&'g self) -> Self::SPORangeIter;
fn empty_ops_range(&'g self) -> Self::OPSRangeIter; }

An RDF graph.

An RDF graph contains triples (subject, predicate, object). The triples can be filered and iterated over. This trait can be used to make data accessible as RDF.

Associated Types

The blank node type of this graph.

The IRI type of this graph.

The literal type of this graph.

The implementation of triples that is ordered by subject, predicate, object.

Iterator for iterating over all triples.

Iterator for iterating over a range for triples sorted by subject, predicate, object.

The implementation of triples that is ordered by object, predicate, subject.

Iterator for iterating over a range for triples sorted by object, predicate, subject.

Required Methods

Iterate over all triples sorted by subject, predicate, object.

Find the DatatypePtr for the given datatype.

Find the IRIPtr for the given IRI.

Find the LiteralPtr for the given literal.

Iterate over the triples that have the given subject.

Iterate over the triples that have the given subject and predicate.

Iterate over the triples that have the given object.

Iterate over the triples that have the given object and predicate.

Iterator that returns no results.

Iterator that returns no results.

Implementors