[−][src]Trait rome::graph::Graph
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
type BlankNodePtr: BlankNodePtr<'g> + Ord + Clone + 'g
The blank node type of this graph.
type IRIPtr: IRIPtr<'g> + Ord + Clone + 'g
The IRI type of this graph.
type LiteralPtr: LiteralPtr<'g> + Ord + Clone
The literal type of this graph.
type SPOTriple: Triple<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr> + Ord + Clone
The implementation of triples that is ordered by subject, predicate, object.
type SPOIter: SortedIterator<Item = Self::SPOTriple>
Iterator for iterating over all triples.
type SPORangeIter: SortedIterator<Item = Self::SPOTriple>
Iterator for iterating over a range for triples sorted by subject, predicate, object.
type OPSTriple: Triple<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr> + Ord + Clone
The implementation of triples that is ordered by object, predicate, subject.
type OPSRangeIter: SortedIterator<Item = Self::OPSTriple>
Iterator for iterating over a range for triples sorted by object, predicate, subject.
Required Methods
fn iter(&'g self) -> Self::SPOIter
Iterate over all triples sorted by subject, predicate, object.
fn find_datatype<'a>(
&'g self,
datatype: &'a str
) -> Option<<Self::LiteralPtr as LiteralPtr<'g>>::DatatypePtr>
&'g self,
datatype: &'a str
) -> Option<<Self::LiteralPtr as LiteralPtr<'g>>::DatatypePtr>
Find the DatatypePtr for the given datatype.
fn find_iri<'a>(&'g self, iri: &'a str) -> Option<Self::IRIPtr>
Find the IRIPtr for the given IRI.
fn find_literal<'a>(
&'g self,
literal: &'a str,
datatype: &'a str,
language: Option<&'a str>
) -> Option<Self::LiteralPtr>
&'g self,
literal: &'a str,
datatype: &'a str,
language: Option<&'a str>
) -> Option<Self::LiteralPtr>
Find the LiteralPtr for the given literal.
fn iter_s(
&'g self,
subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>
) -> Self::SPORangeIter
&'g self,
subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>
) -> Self::SPORangeIter
Iterate over the triples that have the given subject.
fn iter_s_p(
&'g self,
subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>,
predicate: &Self::IRIPtr
) -> Self::SPORangeIter
&'g self,
subject: &BlankNodeOrIRI<'g, Self::BlankNodePtr, Self::IRIPtr>,
predicate: &Self::IRIPtr
) -> Self::SPORangeIter
Iterate over the triples that have the given subject and predicate.
fn iter_o(
&'g self,
object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>
) -> Self::OPSRangeIter
&'g self,
object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>
) -> Self::OPSRangeIter
Iterate over the triples that have the given object.
fn iter_o_p(
&'g self,
object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>,
predicate: &Self::IRIPtr
) -> Self::OPSRangeIter
&'g self,
object: &Resource<'g, Self::BlankNodePtr, Self::IRIPtr, Self::LiteralPtr>,
predicate: &Self::IRIPtr
) -> Self::OPSRangeIter
Iterate over the triples that have the given object and predicate.
fn empty_spo_range(&'g self) -> Self::SPORangeIter
Iterator that returns no results.
fn empty_ops_range(&'g self) -> Self::OPSRangeIter
Iterator that returns no results.