pub trait SRDF: SRDFBasic {
// Required methods
fn predicates_for_subject(
&self,
subject: &Self::Subject
) -> Result<HashSet<Self::IRI>, Self::Err>;
fn objects_for_subject_predicate(
&self,
subject: &Self::Subject,
pred: &Self::IRI
) -> Result<HashSet<Self::Term>, Self::Err>;
fn subjects_with_predicate_object(
&self,
pred: &Self::IRI,
object: &Self::Term
) -> Result<HashSet<Self::Subject>, Self::Err>;
fn triples_with_predicate(
&self,
pred: &Self::IRI
) -> Result<Vec<Triple<Self>>, Self::Err>;
fn outgoing_arcs(
&self,
subject: &Self::Subject
) -> Result<HashMap<Self::IRI, HashSet<Self::Term>>, Self::Err>;
fn incoming_arcs(
&self,
object: &Self::Term
) -> Result<HashMap<Self::IRI, HashSet<Self::Subject>>, Self::Err>;
fn outgoing_arcs_from_list(
&self,
subject: &Self::Subject,
preds: Vec<Self::IRI>
) -> Result<(HashMap<Self::IRI, HashSet<Self::Term>>, Vec<Self::IRI>), Self::Err>;
// Provided method
fn neighs(
&self,
node: &Self::Term
) -> Result<Vec<(Self::IRI, HashSet<Self::Term>)>, Self::Err> { ... }
}
Expand description
This trait contains functions to handle Simple RDF graphs, which are basically to get the neighbourhood of RDF nodes
Required Methods§
fn predicates_for_subject( &self, subject: &Self::Subject ) -> Result<HashSet<Self::IRI>, Self::Err>
fn objects_for_subject_predicate( &self, subject: &Self::Subject, pred: &Self::IRI ) -> Result<HashSet<Self::Term>, Self::Err>
fn subjects_with_predicate_object( &self, pred: &Self::IRI, object: &Self::Term ) -> Result<HashSet<Self::Subject>, Self::Err>
fn triples_with_predicate( &self, pred: &Self::IRI ) -> Result<Vec<Triple<Self>>, Self::Err>
fn outgoing_arcs( &self, subject: &Self::Subject ) -> Result<HashMap<Self::IRI, HashSet<Self::Term>>, Self::Err>
fn incoming_arcs( &self, object: &Self::Term ) -> Result<HashMap<Self::IRI, HashSet<Self::Subject>>, Self::Err>
sourcefn outgoing_arcs_from_list(
&self,
subject: &Self::Subject,
preds: Vec<Self::IRI>
) -> Result<(HashMap<Self::IRI, HashSet<Self::Term>>, Vec<Self::IRI>), Self::Err>
fn outgoing_arcs_from_list( &self, subject: &Self::Subject, preds: Vec<Self::IRI> ) -> Result<(HashMap<Self::IRI, HashSet<Self::Term>>, Vec<Self::IRI>), Self::Err>
get outgoing arcs from a node`` taking into account only a controlled list of
preds`
It resutns a HashMap with the outgoing arcs and their values and a list of the predicates that have values and are not in the controlled list.
Provided Methods§
Object Safety§
This trait is not object safe.