Skip to main content

CompiledShapes

Struct CompiledShapes 

Source
pub struct CompiledShapes { /* private fields */ }
Expand description

Immutable compiled shapes and SPARQL queries; safe to share across validations.

Implementations§

Source§

impl CompiledShapes

Source

pub fn shape_nodes(&self) -> impl Iterator<Item = &Term>

Shape identities discovered by the shared structural compiler.

Source

pub fn compile(store: Dataset, advanced: bool) -> Result<Self>

Source

pub fn compile_with_boolean_policy( store: Dataset, advanced: bool, numeric_booleans: bool, ) -> Result<Self>

Source

pub fn compile_with_namespaces( store: Dataset, advanced: bool, numeric_booleans: bool, namespaces: &[(String, String)], ) -> Result<Self>

Source§

impl CompiledShapes

Source

pub fn validate_store( &self, store: &Store, options: Options, inplace: bool, ) -> Result<ValidationReport>

Validate a consistent Store snapshot without RDF text conversion. Rule additions commit in one Store transaction only after success.

Source

pub fn expand_store( &self, store: &Store, options: Options, inplace: bool, ) -> Result<RuleExpansion>

Expand rules over a Store snapshot; optionally commit the additions.

Source

pub fn shape_focus_nodes( &self, node: &str, data: &Dataset, advanced: bool, ) -> Result<Vec<Term>>

Inspect targets using the same evaluator as validation and rules. The caller supplies the default-union view, reusable across calls.

Source

pub fn targeting_index( &self, data: &Dataset, skip: &HashSet<Term>, ) -> Result<HashMap<Term, Vec<Term>>>

Reverse declared targets for active node shapes. Data is a reusable default-union view. Skipped shapes are never evaluated.

Source

pub fn has_active_rules(&self, options: &Options) -> bool

Mutates only this explicitly supplied store. Python validates a fresh store and commits additions to the caller’s Graph only after successful execution. Whether validation needs a mutable working dataset for selected SHACL rules.

Source

pub fn expand_rules( &self, data: &mut Dataset, options: Options, ) -> Result<Vec<String>>

Source

pub fn expand_rules_delta( &self, data: &mut Dataset, options: Options, ) -> Result<RuleExpansion>

Expand rules while retaining only successfully inserted statements.

Source

pub fn validate( &self, data: &mut Dataset, options: Options, ) -> Result<ValidationReport>

Expand rules, then discover validation targets on the resulting graph.

Source

pub fn validate_readonly( &self, data: &Dataset, options: Options, ) -> Result<ValidationReport>

Validate a borrowed dataset without copying it or permitting rule mutation. Named-graph union materialization remains local to this validation call.

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
§

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

§

fn vzip(self) -> V