shex-validate

This command can be used to validate RDF data using ShEx. This is a specific command for ShEx.

Examples

Validate data using a ShEx schema and ShapeMap

$ rudof shex-validate -s examples/user.shex -m examples/user.sm examples/user.ttl
:a@<http://example.org/User> -> OK
:b@<http://example.org/User> -> OK
:c@<http://example.org/User> -> OK
:d@<http://example.org/User> -> Fail
:e@<http://example.org/User> -> Fail

Validate data using ShEx schema, a node and a shape

$ rudof shex-validate -s examples/user.shex -n ":a" -l ":User" examples/user.ttl
:a@<http://example.org/User> -> OK
:b@<http://example.org/User> -> OK
:c@<http://example.org/User> -> OK
:d@<http://example.org/User> -> Fail
:e@<http://example.org/User> -> Fail

Usage

Validate RDF using ShEx schemas

Usage: rudof shex-validate [OPTIONS] [DATA]...

Arguments:
  [DATA]...  

Options:
  -s, --schema <INPUT>            Schema file name, URI or - (for stdin)
  -f, --schema-format <FORMAT>    ShEx Schema format [possible values: internal, simple, shexc, shexj, json, jsonld, turtle, ntriples, rdfxml, trig, n3, nquads]
  -m, --shapemap <INPUT>          ShapeMap
      --shapemap-format <FORMAT>  ShapeMap format [default: compact] [possible values: compact, internal]
  -n, --node <NODE>               Node to validate
  -l, --shape-label <LABEL>       shape label (default = START)
  -t, --data-format <FORMAT>      RDF Data format [default: turtle] [possible values: turtle, ntriples, rdfxml, trig, n3, nquads, jsonld]
      --base-schema <IRI>         Base Schema (used to resolve relative IRIs in Schema)
      --base-data <IRI>           Base RDF Data IRI (used to resolve relative IRIs in RDF data)
      --reader-mode <MODE>        RDF Reader mode [default: strict] [possible values: lax, strict]
  -e, --endpoint <NAME>           Endpoint with RDF data (name or URL)
  -r, --result-format <FORMAT>    Ouput result format [default: compact] [possible values: turtle, ntriples, rdfxml, trig, n3, nquads, compact, json]
  -o, --output-file <FILE>        Output file name, default = terminal
  -c, --config-file <FILE>        Config file name
      --force-overwrite           Force overwrite to output file if it already exists
  -h, --help                      Print help