Trait terminus_store::layer::Layer [−][src]
A layer containing dictionary entries and triples.
A layer can be queried. To answer queries, layers will check their own data structures, and if they have a parent, the parent is queried as well.
Required methods
fn name(&self) -> [u32; 5]
[src]
The name of this layer.
fn parent_name(&self) -> Option<[u32; 5]>
[src]
fn node_and_value_count(&self) -> usize
[src]
The amount of nodes and values known to this layer. This also counts entries in the parent.
fn predicate_count(&self) -> usize
[src]
The amount of predicates known to this layer. This also counts entries in the parent.
fn subject_id(&self, subject: &str) -> Option<u64>
[src]
The numerical id of a subject, or None if the subject cannot be found.
fn predicate_id(&self, predicate: &str) -> Option<u64>
[src]
The numerical id of a predicate, or None if the predicate cannot be found.
fn object_node_id(&self, object: &str) -> Option<u64>
[src]
The numerical id of a node object, or None if the node object cannot be found.
fn object_value_id(&self, object: &str) -> Option<u64>
[src]
The numerical id of a value object, or None if the value object cannot be found.
fn id_subject(&self, id: u64) -> Option<String>
[src]
The subject corresponding to a numerical id, or None if it cannot be found.
fn id_predicate(&self, id: u64) -> Option<String>
[src]
The predicate corresponding to a numerical id, or None if it cannot be found.
fn id_object(&self, id: u64) -> Option<ObjectType>
[src]
The object corresponding to a numerical id, or None if it cannot be found.
fn all_counts(&self) -> LayerCounts
[src]
Create a struct with all the counts
fn clone_boxed(&self) -> Box<dyn Layer>
[src]
Return a clone of this layer in a box.
fn triple_exists(&self, subject: u64, predicate: u64, object: u64) -> bool
[src]
Returns true if the given triple exists, and false otherwise.
fn triples(&self) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
Iterator over all triples known to this layer.
fn triples_s(&self, subject: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_sp(
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
fn triples_p(&self, predicate: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_o(&self, object: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triple_addition_count(&self) -> usize
[src]
Returns the total amount of triple additions in this layer and all its parents.
fn triple_removal_count(&self) -> usize
[src]
Returns the total amount of triple removals in this layer and all its parents.
Provided methods
fn id_triple_exists(&self, triple: IdTriple) -> bool
[src]
Returns true if the given triple exists, and false otherwise.
fn string_triple_exists(&self, triple: &StringTriple) -> bool
[src]
Returns true if the given triple exists, and false otherwise.
fn string_triple_to_id(&self, triple: &StringTriple) -> Option<IdTriple>
[src]
Convert a StringTriple
to an IdTriple
, returning None if any of the strings in the triple could not be resolved.
fn string_triple_to_partially_resolved(
&self,
triple: StringTriple
) -> PartiallyResolvedTriple
[src]
&self,
triple: StringTriple
) -> PartiallyResolvedTriple
Convert all known strings in the given string triple to ids.
fn id_triple_to_string(&self, triple: &IdTriple) -> Option<StringTriple>
[src]
Convert an id triple to the corresponding string version, returning None if any of those ids could not be converted.
fn triple_count(&self) -> usize
[src]
Returns the total amount of triples in this layer and all its parents.
Implementors
impl Layer for StoreLayer
[src]
fn name(&self) -> [u32; 5]
[src]
fn parent_name(&self) -> Option<[u32; 5]>
[src]
fn node_and_value_count(&self) -> usize
[src]
fn predicate_count(&self) -> usize
[src]
fn subject_id(&self, subject: &str) -> Option<u64>
[src]
fn predicate_id(&self, predicate: &str) -> Option<u64>
[src]
fn object_node_id(&self, object: &str) -> Option<u64>
[src]
fn object_value_id(&self, object: &str) -> Option<u64>
[src]
fn id_subject(&self, id: u64) -> Option<String>
[src]
fn id_predicate(&self, id: u64) -> Option<String>
[src]
fn id_object(&self, id: u64) -> Option<ObjectType>
[src]
fn triple_exists(&self, subject: u64, predicate: u64, object: u64) -> bool
[src]
fn triples(&self) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_s(&self, subject: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_sp(
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
fn triples_p(&self, predicate: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_o(&self, object: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn clone_boxed(&self) -> Box<dyn Layer>
[src]
fn triple_addition_count(&self) -> usize
[src]
fn triple_removal_count(&self) -> usize
[src]
fn all_counts(&self) -> LayerCounts
[src]
impl Layer for SyncStoreLayer
[src]
fn name(&self) -> [u32; 5]
[src]
fn parent_name(&self) -> Option<[u32; 5]>
[src]
fn node_and_value_count(&self) -> usize
[src]
fn predicate_count(&self) -> usize
[src]
fn subject_id(&self, subject: &str) -> Option<u64>
[src]
fn predicate_id(&self, predicate: &str) -> Option<u64>
[src]
fn object_node_id(&self, object: &str) -> Option<u64>
[src]
fn object_value_id(&self, object: &str) -> Option<u64>
[src]
fn id_subject(&self, id: u64) -> Option<String>
[src]
fn id_predicate(&self, id: u64) -> Option<String>
[src]
fn id_object(&self, id: u64) -> Option<ObjectType>
[src]
fn triple_exists(&self, subject: u64, predicate: u64, object: u64) -> bool
[src]
fn triples(&self) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_s(&self, subject: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_sp(
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
fn triples_p(&self, predicate: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_o(&self, object: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn clone_boxed(&self) -> Box<dyn Layer>
[src]
fn triple_addition_count(&self) -> usize
[src]
fn triple_removal_count(&self) -> usize
[src]
fn all_counts(&self) -> LayerCounts
[src]
impl<T: 'static + InternalLayerImpl + Send + Sync + Clone> Layer for T
[src]
fn name(&self) -> [u32; 5]
[src]
fn parent_name(&self) -> Option<[u32; 5]>
[src]
fn node_and_value_count(&self) -> usize
[src]
fn predicate_count(&self) -> usize
[src]
fn subject_id<'a>(&'a self, subject: &str) -> Option<u64>
[src]
fn predicate_id<'a>(&'a self, predicate: &str) -> Option<u64>
[src]
fn object_node_id<'a>(&'a self, object: &str) -> Option<u64>
[src]
fn object_value_id<'a>(&'a self, object: &str) -> Option<u64>
[src]
fn id_subject(&self, id: u64) -> Option<String>
[src]
fn id_predicate(&self, id: u64) -> Option<String>
[src]
fn id_object(&self, id: u64) -> Option<ObjectType>
[src]
fn clone_boxed(&self) -> Box<dyn Layer>
[src]
fn triple_addition_count(&self) -> usize
[src]
fn triple_removal_count(&self) -> usize
[src]
fn all_counts(&self) -> LayerCounts
[src]
fn triple_exists(&self, subject: u64, predicate: u64, object: u64) -> bool
[src]
fn triples(&self) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_s(&self, subject: u64) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
fn triples_sp(
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>
[src]
&self,
subject: u64,
predicate: u64
) -> Box<dyn Iterator<Item = IdTriple> + Send>