# Every operation documented at https://barnard59.zazuko.com/operations

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

<http://barnard59.zazuko.com/operations/carml/transform> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Transforms an XML stream based on a given Carml mapping.";
  rdfs:label "Carml transform";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:barnard59-carml/transform.js>
    ].

<http://barnard59.zazuko.com/operations/csvw/validate> a p:Operation, p:Readable;
  rdfs:comment "Validates a RDF graph against a set of conditions specified in a SHACL document";
  rdfs:label "validate rdf";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-validate-shacl/validate.js#shacl>
    ].

<http://barnard59.zazuko.com/operations/shell/after> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Runs the given command in a shell after all chunks have been processed.";
  rdfs:label "Shell (after)";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:barnard59-shell/after.js>
    ].

<http://barnard59.zazuko.com/operations/shell/before> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Runs the given command in a shell before any chunk has been processed.";
  rdfs:label "Shell (before)";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:barnard59-shell/begin.js>
    ].

<http://barnard59.zazuko.com/operations/shell/shell> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Runs the given command in a shell and forwards stdin and stdout.";
  rdfs:label "Shell";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:barnard59-shell>
    ].

<https://barnard59.zazuko.com/operations/base/batch> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Groups incoming items into arrays of the given size.";
  rdfs:label "Batch";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/batch.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/combine> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Combines multiple streams to a single stream connecting them in the given order.";
  rdfs:label "Combine";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/combine.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/concat> a p:Operation, p:Readable;
  rdfs:comment "Concatenates the content of the given streams to a single stream.";
  rdfs:label "Concat";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/concat.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/concat/object> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Concatenates the content of the given streams to a single stream.";
  rdfs:label "Concat (Object)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/concat.js#object>
    ].

<https://barnard59.zazuko.com/operations/base/filter> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Forwards incoming chunks if they pass the filter function.";
  rdfs:label "Filter";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/filter.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/flatten> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Separates incoming arrays into their elements and emits each element as a single chunk.";
  rdfs:label "Flatten";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/flatten.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/forEach> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Calls a sub pipeline for each incoming chunk.";
  rdfs:label "For Each";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/forEach.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/glob> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Match files using the given pattern and emits each filename as a single chunk.";
  rdfs:label "Glob";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/glob.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/json/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Converts each chunk to an object by calling JSON.parse().";
  rdfs:label "Parse JSON";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/json.js#parse>
    ].

<https://barnard59.zazuko.com/operations/base/json/stringify> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Converts each chunk to a JSON string by calling JSON.stringify().";
  rdfs:label "Serialize JSON";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/json.js#stringify>
    ].

<https://barnard59.zazuko.com/operations/base/limit> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Limits the amount of forwarded chunks and discards any chunks after reaching the limit.";
  rdfs:label "Limit";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/limit.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/map> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Converts each chunk using the given function.";
  rdfs:label "Map";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/map.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/nul> a p:Operation, p:WritableObjectMode;
  rdfs:comment "Dummy output stream, just like /dev/null.";
  rdfs:label "/dev/null";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/dev-nul.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/offset> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Discards all chunks before the given offset.";
  rdfs:label "Offset";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/offset.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/stdin> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Reads from standard input";
  rdfs:label "stdin";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/process.js#stdin>
    ].

<https://barnard59.zazuko.com/operations/base/stdout> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Writes the incoming data to stdout and also forwards the data to the stream output.";
  rdfs:label "stdout";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/process.js#stdout>
    ].

<https://barnard59.zazuko.com/operations/base/streamValues> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Creates a readable stream from the given array.";
  rdfs:label "Stream values";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/Readable.js#from>
    ].

<https://barnard59.zazuko.com/operations/base/toString> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Converts each chunk to a string by calling .toString().";
  rdfs:label "To String";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/toString.js#default>
    ].

<https://barnard59.zazuko.com/operations/core/fs/createReadStream> a p:Operation, p:Readable;
  rdfs:comment "Reads a file from the local file system.";
  rdfs:label "Read file";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:fs#createReadStream>
    ].

<https://barnard59.zazuko.com/operations/core/fs/createWriteStream> a p:Operation, p:Writable;
  rdfs:comment "Writes a file to the local file system.";
  rdfs:label "Write file";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:fs#createWriteStream>
    ].

<https://barnard59.zazuko.com/operations/csvw/fetch> a p:Operation, p:Readable;
  rdfs:comment "Loads a CSVW file from the local filesystem or the web depending on the given argument";
  rdfs:label "Fetch CSVW";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-csvw/fetch.js#default>
    ].

<https://barnard59.zazuko.com/operations/cube/buildCubeShape> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Builds a Cube Shape based on Cube Observation datasets";
  rdfs:label "build Cube Shape";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-cube/cube.js#buildCubeShape>
    ].

<https://barnard59.zazuko.com/operations/cube/toObservation> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Converts a set of quads to a Cube Observation";
  rdfs:label "to Cube Observation";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-cube/cube.js#toObservation>
    ].

<https://barnard59.zazuko.com/operations/formats/csvw/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Parses the given CSV stream using the given metadata.";
  rdfs:label "Parse CSV on the Web";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/csvw.js#parse>
    ].

<https://barnard59.zazuko.com/operations/formats/jsonld/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Parses the given JSON-LD stream.";
  rdfs:label "Parse JSON-LD";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/jsonld.js#parse>
    ].

<https://barnard59.zazuko.com/operations/formats/jsonld/parse/object> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Parses the given JSON-LD stream.";
  rdfs:label "Parse JSON-LD (Object)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/jsonld.js#parseObject>
    ].

<https://barnard59.zazuko.com/operations/formats/jsonld/serialize> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Serializes the given RDF/JS Quads to JSON-LD.";
  rdfs:label "Serialize JSON-LD";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/jsonld.js#serialize>
    ].

<https://barnard59.zazuko.com/operations/formats/n3/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Parses the given N3 stream.";
  rdfs:label "Parse N3";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/n3.js#parse>
    ].

<https://barnard59.zazuko.com/operations/formats/ntriples/serialize> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Serializes the given RDF/JS Quads to N-Triples.";
  rdfs:label "Serialize N-Triples";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/ntriples.js#serialize>
    ].

<https://barnard59.zazuko.com/operations/formats/rdf-xml/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Parses the given RDF/XML stream.";
  rdfs:label "Parse RDF/XML";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/rdf-xml.js#parse>
    ].

<https://barnard59.zazuko.com/operations/formats/xlsx/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Parses the given XLSX stream using the given metadata.";
  rdfs:label "Parse XSLX files based on the CSV on the Web standard";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-formats/xlsx.js#parse>
    ].

<https://barnard59.zazuko.com/operations/ftp/list> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Lists all files in the given FTP folder.";
  rdfs:label "List files (FTP)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-ftp/list.js#default>
    ].

<https://barnard59.zazuko.com/operations/ftp/move> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Moves the given file at the end of the stream processing and forwards any incoming data.";
  rdfs:label "Move file (FTP)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-ftp/move.js#default>
    ].

<https://barnard59.zazuko.com/operations/ftp/read> a p:Operation, p:Readable;
  rdfs:comment "Reads the given file.";
  rdfs:label "Read file (FTP)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-ftp/read.js#default>
    ].

<https://barnard59.zazuko.com/operations/ftp/write> a p:Operation, p:Writable;
  rdfs:comment "Uploads the stream to FTP.";
  rdfs:label "Put file (FTP)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-ftp/write.js#default>
    ].

<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/operations/http/get> a p:Operation, p:Readable;
  rdfs:comment "Makes a HTTP GET request and returns the body of the response as stream.";
  rdfs:label "HTTP GET request";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-http/get.js#default>
    ].

<https://barnard59.zazuko.com/operations/http/post> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Makes a HTTP POST request, sends the written data as request body and returns the body of the response as stream.";
  rdfs:label "HTTP POST request";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-http/post.js#default>
    ].

<https://barnard59.zazuko.com/operations/n3/applyRules> a p:Operation, p:Readable;
  rdfs:comment "Applies N3 rules to datasets in barnard59 pipelines";
  rdfs:label "Apply N3 Rules";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-n3/applyRules.js#default>
    ].

<https://barnard59.zazuko.com/operations/rdf/fs.js#parse> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Opens and parses an RDF file, choosing the correct parser based on the extension";
  rdfs:label "Parse RDF file";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/fs.js#parse>
    ].

<https://barnard59.zazuko.com/operations/rdf/getDataset> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "The entire RDF stream is combined into a single dataset";
  rdfs:label "Combine RDF stream to dataset";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:rdf-stream-to-dataset-stream/toDatasetStream.js>
    ].

<https://barnard59.zazuko.com/operations/rdf/mapMatch> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Calls a map function only for quads matching the given triple pattern.";
  rdfs:label "Map (RDF/JS Quad)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/mapMatch.js#default>
    ].

<https://barnard59.zazuko.com/operations/rdf/metadata.js#append> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Fetches, updates and appends a metadata resource";
  rdfs:label "Append metadata";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/metadata.js#append>
    ].

<https://barnard59.zazuko.com/operations/rdf/metadata.js#voidStats> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Appends void statistics, such as counts for entities and properties";
  rdfs:label "Void statistics";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/metadata.js#voidStats>
    ].

<https://barnard59.zazuko.com/operations/rdf/open> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Web resource requires content-type header. Will try n-triples as fallback. Local paths will be relative to the current working directory";
  rdfs:label "Opens an RDF from web or local file";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/open.js#default>
    ].

<https://barnard59.zazuko.com/operations/rdf/setGraph> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Sets the graph of all quads to the given fixed value.";
  rdfs:label "Set Graph";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/setGraph.js#default>
    ].

<https://barnard59.zazuko.com/operations/rdf/splitDataset/byGraph> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Combines streamed quads into datasets. A new dataset is pushed when graph changes";
  rdfs:label "Splits RDF stream on graph";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:rdf-stream-to-dataset-stream/byGraph.js>
    ].

<https://barnard59.zazuko.com/operations/rdf/splitDataset/byPredicate> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Combines streamed quads into datasets. A new dataset is pushed when predicate changes";
  rdfs:label "Splits RDF stream on predicate";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:rdf-stream-to-dataset-stream/byPredicate.js>
    ].

<https://barnard59.zazuko.com/operations/rdf/splitDataset/bySubject> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Combines streamed quads into datasets. A new dataset is pushed when subject changes";
  rdfs:label "Splits RDF stream on subject";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:rdf-stream-to-dataset-stream/bySubject.js>
    ].

<https://barnard59.zazuko.com/operations/rdf/splitDataset/byType> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Combines streamed quads into datasets. A new dataset is pushed when an rdf:type triple is encountered";
  rdfs:label "Splits RDF stream by RDF type";
  code:implementedBy [ a code:EcmaScript;
      code:link <node:rdf-stream-to-dataset-stream/byType.js>
    ].

<https://barnard59.zazuko.com/operations/rdf/transformCodeImports> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:label "Transforms code:imports triples by fetching remote graphs and mergin them with the passing stream";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-rdf/imports.js#default>
    ].

<https://barnard59.zazuko.com/operations/s3/getObject> a p:Operation;
  rdfs:comment "Get an object from a S3 bucket.";
  rdfs:label "Get S3 object";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-s3/cmd/getObject.js#default>
    ].

<https://barnard59.zazuko.com/operations/s3/getObject/stream> a p:Operation, p:Readable;
  rdfs:comment "Get an object from a S3 bucket as a Readable stream.";
  rdfs:label "Get S3 object as stream";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-s3/cmd/getObjectStream.js#default>
    ].

<https://barnard59.zazuko.com/operations/s3/putObject> a p:Operation;
  rdfs:comment "Put an object to a S3 bucket.";
  rdfs:label "Put an object to S3";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-s3/cmd/putObject.js#default>
    ].

<https://barnard59.zazuko.com/operations/shacl/report> a p:Operation, p:Readable;
  rdfs:comment "Validates a RDF graph against a set of conditions specified in a SHACL document, returning the validation report";
  rdfs:label "validate rdf";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-shacl/report.js#shacl>
    ].

<https://barnard59.zazuko.com/operations/shacl/validate> a p:Operation, p:Readable;
  rdfs:comment "Validates a RDF graph against a set of conditions specified in a SHACL document";
  rdfs:label "validate rdf";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-shacl/validate.js#shacl>
    ].

<https://barnard59.zazuko.com/operations/sparql/construct> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Runs the given CONSTRUCT query against the given endpoint parses the result.";
  rdfs:label "SPARQL Construct";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-sparql/construct.js#default>
    ].

<https://barnard59.zazuko.com/operations/sparql/in-memory/query> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Runs the given query against each input chunk.";
  rdfs:label "SPARQL in-memory Query";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-sparql/inMemory.js#query>
    ].

<https://barnard59.zazuko.com/operations/sparql/in-memory/update> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Runs the given DELETE/INSERT command against each input chunk.";
  rdfs:label "SPARQL in-memory Update";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-sparql/inMemory.js#update>
    ].

<https://barnard59.zazuko.com/operations/sparql/select> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Runs the given SELECT query against the given endpoint parses the result into rows of RDF/JS key-value pairs.";
  rdfs:label "SPARQL Select";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-sparql/select.js#default>
    ].
