rudof shapemap

rudof shapemap reads a ShapeMap and shows it. A ShapeMap selects the nodes to validate and the shapes to validate them against, for example :alice@:Person. ShEx validation results also have the form of a ShapeMap.

The command resolves the prefixed names of the ShapeMap with the prefixes of the loaded data and the loaded ShEx schema. Use it in rudof shell, after you load the data and the schema:

rudof> data examples/user.ttl
17 triple(s) loaded
rudof> shex -s examples/user.shex
1 shape(s) loaded
rudof> shapemap -m examples/user.sm
:a@:User
:b@:User
:c@:User
:d@:User
:e@:User
:f@:User

With -r json, the result is the ShapeMap in JSON, with its node and shape prefix maps. With no -m, the command shows the ShapeMap that is already loaded.

To validate with a ShapeMap, pass it to shex-validate or validate with --shapemap.

Options

$ rudof shapemap --help
Show information about ShEx ShapeMaps

Usage: rudof shapemap [OPTIONS]

Options:
  -m, --shapemap <INPUT>        ShapeMap (FILE, URI or - for stdin). If omitted, shows the currently loaded shapemap
  -f, --format <FORMAT>         ShapeMap format, default = compact [default: compact] [possible values: compact, internal, json, details, csv]
      --base-data <IRI>         Base IRI for data
      --base-schema <IRI>       Base IRI for Schema
  -r, --result-format <FORMAT>  Result shapemap format, default = compact [default: compact] [possible values: compact, internal, json, details, csv]
  -o, --output-file <FILE>      Output file name, default = terminal
      --force-overwrite         Force overwrite to output file if it already exists
  -h, --help                    Print help