Skip to main content

FrozenIndexedDataset

Struct FrozenIndexedDataset 

Source
pub struct FrozenIndexedDataset {
    pub stats: DatasetStatistics,
    /* private fields */
}
Expand description

Immutable, dictionary-encoded snapshot of a post-inference RDF dataset. Intended to be built once at the inference→validation boundary and shared across all per-focus-node SPARQL evaluations.

Fields§

§stats: DatasetStatistics

Implementations§

Source§

impl FrozenIndexedDataset

Source

pub fn from_graph(graph: &Graph) -> Self

Build from a single graph loaded into the default graph slot.

Source

pub fn from_graph_union(left: &Graph, right: &Graph) -> Self

Build a default graph from the set union of two source graphs without materializing an intermediate Graph.

Source

pub fn from_graphs(context: &Graph, shapes: &Graph) -> Self

Build with context in the default graph and shapes in the named graph urn:x-shacl:shapes-graph, mirroring what SparqlExecutor::build does with the Oxigraph Store.

Source

pub fn from_graph_union_with_shapes(data: &Graph, shapes: &Graph) -> Self

Build a union default graph while also exposing shapes through the named $shapesGraph slot.

Trait Implementations§

Source§

impl PathBackend for FrozenIndexedDataset

Indexed backend over the dictionary-encoded post-inference snapshot. Built once at the inference→validation boundary and shared across focus nodes; the u32-keyed sorted indexes replace per-call term hashing and B-tree walks. Unknown terms intern to fresh ids that match no stored triple — exactly the empty-result semantics path evaluation needs.

Source§

fn objects(&self, subject: &Term, predicate: &NamedNode) -> HashSet<Term>

{ o | (subject, predicate, o) ∈ G } — forward step.
Source§

fn subjects(&self, predicate: &NamedNode, object: &Term) -> HashSet<Term>

{ s | (s, predicate, object) ∈ G } — backward step.
Source§

fn out_predicates(&self, subject: &Term) -> BTreeSet<NamedNode>

Predicates of the outgoing triples of subject (used by sh:closed).
Source§

impl<'a> QueryableDataset<'a> for &'a FrozenIndexedDataset

Source§

type InternalTerm = u32

Internal representation of an RDF term Read more
Source§

type Error = Infallible

Error returned by the dataset.
Source§

fn internal_quads_for_pattern( &self, subject: Option<&TermId>, predicate: Option<&TermId>, object: Option<&TermId>, graph_name: Option<Option<&TermId>>, ) -> Box<dyn Iterator<Item = Result<InternalQuad<TermId>, Infallible>> + 'a>

Fetches quads according to a pattern Read more
Source§

fn internalize_term(&self, term: Term) -> Result<TermId, Infallible>

Builds an internal term from the Term struct
Source§

fn externalize_term(&self, id: TermId) -> Result<Term, Infallible>

Builds a Term from an internal term
Source§

fn internal_named_graphs( &self, ) -> impl Iterator<Item = Result<Self::InternalTerm, Self::Error>> + use<'a, Self>

Fetches the list of dataset named graphs
Source§

fn contains_internal_graph_name( &self, graph_name: &Self::InternalTerm, ) -> Result<bool, Self::Error>

Returns if the dataset contains a given named graph
Source§

fn externalize_expression_term( &self, term: Self::InternalTerm, ) -> Result<ExpressionTerm, Self::Error>

Builds an ExpressionTerm from an internal term
Source§

fn internalize_expression_term( &self, term: ExpressionTerm, ) -> Result<Self::InternalTerm, Self::Error>

Builds an internal term from an ExpressionTerm
Source§

fn internal_term_effective_boolean_value( &self, term: Self::InternalTerm, ) -> Result<Option<bool>, Self::Error>

Computes the term Effective boolean value

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V