[][src]Trait rdftk_core::graph::Graph

pub trait Graph {
    fn is_empty(&self) -> bool;
fn len(&self) -> usize;
fn contains(&self, statement: &Statement) -> bool;
fn contains_all(
        &self,
        subject: &SubjectNode,
        predicate: &IRIRef,
        object: &ObjectNode
    ) -> bool;
fn statements(&self) -> Vec<Rc<Statement>>;
fn statements_for(&self, subject: &SubjectNode) -> Vec<Rc<Statement>>;
fn subjects(&self) -> HashSet<&SubjectNode>;
fn predicates(&self) -> HashSet<&IRIRef>;
fn predicates_for(&self, subject: &SubjectNode) -> HashSet<&IRIRef>;
fn objects(&self) -> HashSet<&ObjectNode>;
fn objects_for(
        &self,
        subject: &SubjectNode,
        predicate: &IRIRef
    ) -> HashSet<&ObjectNode>;
fn resource_for(&self, subject: &SubjectNode) -> Resource;
fn prefix_mappings(&self) -> Rc<dyn PrefixMappings>; }

The core graph interface implemented by all model providers.

Required methods

fn is_empty(&self) -> bool

fn len(&self) -> usize

fn contains(&self, statement: &Statement) -> bool

fn contains_all(
    &self,
    subject: &SubjectNode,
    predicate: &IRIRef,
    object: &ObjectNode
) -> bool

fn statements(&self) -> Vec<Rc<Statement>>

fn statements_for(&self, subject: &SubjectNode) -> Vec<Rc<Statement>>

fn subjects(&self) -> HashSet<&SubjectNode>

fn predicates(&self) -> HashSet<&IRIRef>

fn predicates_for(&self, subject: &SubjectNode) -> HashSet<&IRIRef>

fn objects(&self) -> HashSet<&ObjectNode>

fn objects_for(
    &self,
    subject: &SubjectNode,
    predicate: &IRIRef
) -> HashSet<&ObjectNode>

fn resource_for(&self, subject: &SubjectNode) -> Resource

fn prefix_mappings(&self) -> Rc<dyn PrefixMappings>

Loading content...

Implementors

Loading content...