# CLI commands provided by barnard59-shacl, with the pipeline each runs
# https://barnard59.zazuko.com/packages/shacl

@prefix b59: <https://barnard59.zazuko.com/vocab#>.
@prefix code: <https://code.described.at/>.
@prefix p: <https://pipeline.described.at/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

<https://barnard59.zazuko.com/operations/shacl/command/report-summary> a b59:CliCommand;
  rdfs:label "Human-readable summary of SHACL validation report";
  b59:command "report-summary";
  b59:source "barnard59-shacl/pipeline/report-summary.ttl".

<https://barnard59.zazuko.com/operations/shacl/command/validate> a b59:CliCommand;
  rdfs:label "Validates the RDF in standard input against a SHACL document";
  b59:command "validate";
  b59:pipeline <https://barnard59.zazuko.com/pipeline/shacl/validate>;
  b59:source "barnard59-shacl/pipeline/validate.ttl".

<https://barnard59.zazuko.com/pipeline/shacl/_getShapes> a p:Pipeline, p:ReadableObjectMode;
  p:steps [
      p:stepList (_:b1 _:b2)
    ];
  p:variables _:b3.

<https://barnard59.zazuko.com/pipeline/shacl/_validate> a p:Pipeline, p:Readable, p:Writable;
  p:steps [
      p:stepList (_:b4 _:b5 _:b6 _:b7 _:b8)
    ].

<https://barnard59.zazuko.com/pipeline/shacl/report-summary> a p:Pipeline, p:Readable;
  p:steps [
      p:stepList (_:b9 _:b10 _:b11 _:b12 _:b13)
    ].

<https://barnard59.zazuko.com/pipeline/shacl/validate> a p:Pipeline, p:Readable;
  p:steps [
      p:stepList (_:b14 <https://barnard59.zazuko.com/pipeline/shacl/_validate>)
    ];
  p:variables _:b3.

_:b13
  <https://barnard59.zazuko.com/operations/base/flatten> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b9
  <https://barnard59.zazuko.com/operations/base/stdin> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b10
  <https://barnard59.zazuko.com/operations/formats/n3/parse> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b11
  <https://barnard59.zazuko.com/operations/rdf/getDataset> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b12 a p:Step;
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <file:../lib/report.js#getSummary>
    ].

_:b3
  p:variable [ a p:Variable;
      rdfs:label "URL or path of the shapes graph";
      p:name "shapes";
      p:required false
    ], [ a p:Variable;
      rdfs:label "Override the shapes graph format";
      p:name "shapesMediaType";
      p:required false
    ].

_:b5
  <https://barnard59.zazuko.com/operations/rdf/getDataset> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b6 a p:Step;
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <file:validate.js#default>
    ].

_:b7
  <https://barnard59.zazuko.com/operations/base/flatten> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b8
  <https://barnard59.zazuko.com/operations/formats/ntriples/serialize> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b1
  <https://barnard59.zazuko.com/operations/rdf/open> ("shapes"^^p:VariableName "shapesMediaType"^^p:VariableName).

_:b2
  <https://barnard59.zazuko.com/operations/rdf/transformCodeImports> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b14
  <https://barnard59.zazuko.com/operations/base/stdin> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.

_:b4
  <https://barnard59.zazuko.com/operations/formats/n3/parse> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.
