pub struct CompiledShapes { /* private fields */ }Expand description
Immutable compiled shapes and SPARQL queries; safe to share across validations.
Implementations§
Source§impl CompiledShapes
impl CompiledShapes
Sourcepub fn shape_nodes(&self) -> impl Iterator<Item = &Term>
pub fn shape_nodes(&self) -> impl Iterator<Item = &Term>
Shape identities discovered by the shared structural compiler.
pub fn compile(store: Dataset, advanced: bool) -> Result<Self>
pub fn compile_with_boolean_policy( store: Dataset, advanced: bool, numeric_booleans: bool, ) -> Result<Self>
pub fn compile_with_namespaces( store: Dataset, advanced: bool, numeric_booleans: bool, namespaces: &[(String, String)], ) -> Result<Self>
Source§impl CompiledShapes
impl CompiledShapes
Sourcepub fn validate_store(
&self,
store: &Store,
options: Options,
inplace: bool,
) -> Result<ValidationReport>
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.
Sourcepub fn expand_store(
&self,
store: &Store,
options: Options,
inplace: bool,
) -> Result<RuleExpansion>
pub fn expand_store( &self, store: &Store, options: Options, inplace: bool, ) -> Result<RuleExpansion>
Expand rules over a Store snapshot; optionally commit the additions.
Sourcepub fn shape_focus_nodes(
&self,
node: &str,
data: &Dataset,
advanced: bool,
) -> Result<Vec<Term>>
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.
Sourcepub fn targeting_index(
&self,
data: &Dataset,
skip: &HashSet<Term>,
) -> Result<HashMap<Term, Vec<Term>>>
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.
Sourcepub fn has_active_rules(&self, options: &Options) -> bool
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.
pub fn expand_rules( &self, data: &mut Dataset, options: Options, ) -> Result<Vec<String>>
Sourcepub fn expand_rules_delta(
&self,
data: &mut Dataset,
options: Options,
) -> Result<RuleExpansion>
pub fn expand_rules_delta( &self, data: &mut Dataset, options: Options, ) -> Result<RuleExpansion>
Expand rules while retaining only successfully inserted statements.
Sourcepub fn validate(
&self,
data: &mut Dataset,
options: Options,
) -> Result<ValidationReport>
pub fn validate( &self, data: &mut Dataset, options: Options, ) -> Result<ValidationReport>
Expand rules, then discover validation targets on the resulting graph.
Sourcepub fn validate_readonly(
&self,
data: &Dataset,
options: Options,
) -> Result<ValidationReport>
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.