Skip to content

Commit

Permalink
feat: expose some API to retrieve shacl validation results
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoine-Arnaud committed Sep 30, 2024
1 parent e08c679 commit 31486f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions shacl_validation/src/validation_report/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ impl<S: SRDFBasic> ValidationReport<S> {
self.conforms
}

pub fn results_size(&self) -> usize {
self.results.len()
pub fn results(&self) -> &Vec<ValidationResult<S>> {
&self.results
}

pub(crate) fn add_result(&mut self, result: ValidationResult<S>) {
Expand Down
12 changes: 6 additions & 6 deletions shacl_validation/src/validation_report/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,27 @@ impl<S: SRDFBasic> ValidationResult<S> {
builder.build()
}

pub(crate) fn focus_node(&self) -> Option<S::Term> {
pub fn focus_node(&self) -> Option<S::Term> {
self.focus_node.to_owned()
}

pub(crate) fn result_severity(&self) -> Option<S::Term> {
pub fn result_severity(&self) -> Option<S::Term> {
self.result_severity.to_owned()
}

pub(crate) fn result_path(&self) -> Option<S::Term> {
pub fn result_path(&self) -> Option<S::Term> {
self.result_path.to_owned()
}

pub(crate) fn source_constraint_component(&self) -> Option<S::Term> {
pub fn source_constraint_component(&self) -> Option<S::Term> {
self.source_constraint_component.to_owned()
}

pub(crate) fn source_shape(&self) -> Option<S::Term> {
pub fn source_shape(&self) -> Option<S::Term> {
self.source_shape.to_owned()
}

pub(crate) fn value(&self) -> Option<S::Term> {
pub fn value(&self) -> Option<S::Term> {
self.value.to_owned()
}
}
Expand Down

0 comments on commit 31486f5

Please sign in to comment.