Class: RDF::Oxigraph::SHACL::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/rdf/oxigraph/shacl.rb

Overview

A SHACL validation report. #results is an array of hashes with string keys: focus, path, value, source, severity, message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Report

Returns a new instance of Report.



23
24
25
# File 'lib/rdf/oxigraph/shacl.rb', line 23

def initialize(raw)
  @raw = raw
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



21
22
23
# File 'lib/rdf/oxigraph/shacl.rb', line 21

def raw
  @raw
end

Instance Method Details

#conforms?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/rdf/oxigraph/shacl.rb', line 27

def conforms?
  @raw["conforms"]
end

#resultsObject



35
36
37
# File 'lib/rdf/oxigraph/shacl.rb', line 35

def results
  @raw["results"]
end

#to_sObject

Human-readable validation report.



40
41
42
# File 'lib/rdf/oxigraph/shacl.rb', line 40

def to_s
  @raw["text"]
end

#violationsObject



31
32
33
# File 'lib/rdf/oxigraph/shacl.rb', line 31

def violations
  @raw["violations"]
end