shacl_validation::engine

Trait Engine

Source
pub trait Engine<S: SRDFBasic> {
Show 15 methods // Required methods fn evaluate( &self, store: &S, shape: &CompiledShape<S>, component: &CompiledComponent<S>, value_nodes: &ValueNodes<S>, ) -> Result<Vec<ValidationResult>, ValidateError>; fn target_node( &self, store: &S, node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn target_class( &self, store: &S, class: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn target_subject_of( &self, store: &S, predicate: &S::IRI, ) -> Result<FocusNodes<S>, ValidateError>; fn target_object_of( &self, store: &S, predicate: &S::IRI, ) -> Result<FocusNodes<S>, ValidateError>; fn implicit_target_class( &self, store: &S, shape: &CompiledShape<S>, ) -> Result<FocusNodes<S>, ValidateError>; fn predicate( &self, store: &S, shape: &CompiledPropertyShape<S>, predicate: &S::IRI, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn alternative( &self, store: &S, shape: &CompiledPropertyShape<S>, paths: &[SHACLPath], focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn sequence( &self, store: &S, shape: &CompiledPropertyShape<S>, paths: &[SHACLPath], focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn inverse( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn zero_or_more( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn one_or_more( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; fn zero_or_one( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>; // Provided methods fn focus_nodes( &self, store: &S, shape: &CompiledShape<S>, targets: &[CompiledTarget<S>], ) -> Result<FocusNodes<S>, ValidateError> { ... } fn path( &self, store: &S, shape: &CompiledPropertyShape<S>, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError> { ... }
}

Required Methods§

Source

fn evaluate( &self, store: &S, shape: &CompiledShape<S>, component: &CompiledComponent<S>, value_nodes: &ValueNodes<S>, ) -> Result<Vec<ValidationResult>, ValidateError>

Source

fn target_node( &self, store: &S, node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

If s is a shape in a shapes graph SG and s has value t for sh:targetNode in SG then { t } is a target from any data graph for s in SG.

Source

fn target_class( &self, store: &S, class: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn target_subject_of( &self, store: &S, predicate: &S::IRI, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn target_object_of( &self, store: &S, predicate: &S::IRI, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn implicit_target_class( &self, store: &S, shape: &CompiledShape<S>, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn predicate( &self, store: &S, shape: &CompiledPropertyShape<S>, predicate: &S::IRI, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn alternative( &self, store: &S, shape: &CompiledPropertyShape<S>, paths: &[SHACLPath], focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn sequence( &self, store: &S, shape: &CompiledPropertyShape<S>, paths: &[SHACLPath], focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn inverse( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn zero_or_more( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn one_or_more( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Source

fn zero_or_one( &self, store: &S, shape: &CompiledPropertyShape<S>, path: &SHACLPath, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Provided Methods§

Source

fn focus_nodes( &self, store: &S, shape: &CompiledShape<S>, targets: &[CompiledTarget<S>], ) -> Result<FocusNodes<S>, ValidateError>

Source

fn path( &self, store: &S, shape: &CompiledPropertyShape<S>, focus_node: &S::Term, ) -> Result<FocusNodes<S>, ValidateError>

Implementors§

Source§

impl<S: QuerySRDF + Debug + 'static> Engine<S> for SparqlEngine

Source§

impl<S: SRDF + Debug + 'static> Engine<S> for NativeEngine