pub struct GraphValidation { /* private fields */ }Expand description
The In-Memory Graph Validation algorithm.
Implementations§
Source§impl GraphValidation
impl GraphValidation
Sourcepub fn from_path<P: AsRef<Path>>(
data: P,
data_format: RDFFormat,
base: Option<&str>,
mode: ShaclValidationMode,
) -> Result<Self, Box<ValidateError>>
pub fn from_path<P: AsRef<Path>>( data: P, data_format: RDFFormat, base: Option<&str>, mode: ShaclValidationMode, ) -> Result<Self, Box<ValidateError>>
Returns an In-Memory Graph validation SHACL processor.
§Arguments
data- A path to the graph’s serialization filedata_format- Any of the possible RDF serialization formatsbase- An optional String, the base URImode- Any of the possible SHACL validation modes
§Examples
use std::path::Path;
use shacl_validation::shacl_processor::GraphValidation;
use shacl_validation::shacl_processor::ShaclValidationMode;
use shacl_validation::shacl_processor::ShaclProcessor;
use rudof_rdf::rdf_core::RDFFormat;
let graph_validation = GraphValidation::from_path(
"../examples/book_conformant.ttl", // example graph (refer to the examples folder)
RDFFormat::Turtle, // serialization format of the graph
None, // no base is defined
ShaclValidationMode::Native, // use the Native mode (performance)
);pub fn from_graph(graph: Graph, mode: ShaclValidationMode) -> GraphValidation
Trait Implementations§
Source§impl ShaclProcessor<RdfData> for GraphValidation
Available on crate feature sparql only.
impl ShaclProcessor<RdfData> for GraphValidation
Available on crate feature
sparql only.Source§fn validate(
&mut self,
shapes_graph: &SchemaIR,
) -> Result<ValidationReport, Box<ValidateError>>
fn validate( &mut self, shapes_graph: &SchemaIR, ) -> Result<ValidationReport, Box<ValidateError>>
Executes the Validation of the provided Graph, in any of the supported
formats, against the shapes graph passed as an argument. As a result,
the Validation Report generated from the validation process is returned. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GraphValidation
impl !UnwindSafe for GraphValidation
impl Freeze for GraphValidation
impl Send for GraphValidation
impl Sync for GraphValidation
impl Unpin for GraphValidation
impl UnsafeUnpin for GraphValidation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more