# Everything barnard59-graph-store declares in RDF: operations and CLI commands
# https://barnard59.zazuko.com/packages/graph-store

@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/command/graph-store/put> a b59:CliCommand;
  rdfs:label "Upload RDF documents using SPARQL Graph Store Protocol";
  b59:command "put";
  b59:source "barnard59-graph-store/pipeline/put.ttl".

<https://barnard59.zazuko.com/operations/graph-store/get> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Reads RDF/JS Quads from the given named graph using the SPARQL Graph Store Protocol.";
  rdfs:label "Read RDF/JS Quads (Graph Store)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-graph-store/get.js#default>
    ].

<https://barnard59.zazuko.com/operations/graph-store/post> a p:Operation, p:WritableObjectMode;
  rdfs:comment "Appends RDF/JS Quads to the given named graph using the SPARQL Graph Store Protocol.";
  rdfs:label "Append RDF/JS Quads (Graph Store)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-graph-store/post.js#default>
    ].

<https://barnard59.zazuko.com/operations/graph-store/put> a p:Operation, p:WritableObjectMode;
  rdfs:comment "Writes RDF/JS Quads to the given named graph using the SPARQL Graph Store Protocol.";
  rdfs:label "Write RDF/JS Quads (Graph Store)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-graph-store/put.js#default>
    ].

<https://barnard59.zazuko.com/pipeline/graph-store/put> a p:Pipeline;
  p:steps [
      p:stepList (_:b1 _:b2 _:b3)
    ];
  p:variables [
      p:variable [ a p:Variable;
          rdfs:label "Glob of RDF documents to upload";
          p:name "source"
        ], [ a p:Variable;
          p:name "graph";
          p:required false
        ], [ a p:Variable;
          p:name "endpoint"
        ], [ a p:Variable;
          p:name "user";
          p:required false
        ], [ a p:Variable;
          p:name "password";
          p:required false
        ]
    ].

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

_:b3
  <https://barnard59.zazuko.com/operations/graph-store/put> [
      code:name "graph";
      code:value "graph"^^p:VariableName
    ], [
      code:name "endpoint";
      code:value "endpoint"^^p:VariableName
    ], [
      code:name "user";
      code:value "user"^^p:VariableName
    ], [
      code:name "password";
      code:value "password"^^p:VariableName
    ].

_:b1
  <https://barnard59.zazuko.com/operations/base/glob> [
      code:name "pattern";
      code:value "source"^^p:VariableName
    ].
