ROBOT

- - - - - - - - - -
view on github
getting started
common errors
chaining commands
global options
makefile
plugins
- - - - - - - - - -
annotate
collapse
convert
diff
expand
explain
export
export-prefixes
extract
filter
materialize
measure
merge
mirror
python
query
reason
reduce
relax
remove
rename
repair
report
template
unmerge
validate-profile
verify
- - - - - - - - - -
ROBOT is licensed under the
BSD 3-Clause License.
Theme by orderedlist

Verify

The verify command is used to check an ontology for violations of rules. Each rule is expressed as a SPARQL SELECT query that matches violations of the rule. If the query produces any results, verify will exit with an error message that reports the violations. If the ontology conforms to the rule, the query should find no violations, and the verify command will succeed.

In the verify command, you specify a set of queries using the --queries parameter and specify an output directory for the result using the --output-dir parameter, e.g. --queries query-file-1 query-file-2 … --output-dir some-directory

For example:

robot verify --input asserted-equiv.owl --queries equivalent.sparql --output-dir results/

Should output as a response:

Rule /ontodev/robot/examples/equivalent.sparql: 1 violation(s)
first,second,firstLabel,secondLabel
http://purl.obolibrary.org/obo/TEST_A,http://purl.obolibrary.org/obo/TEST_B,,

And the CSV file results/equivalent.csv should have:

first,second,firstLabel,secondLabel
http://purl.obolibrary.org/obo/TEST_A,http://purl.obolibrary.org/obo/TEST_B,,

Fail on Violation

By default, this command will fail with a non-zero exit code when any violations are found. If you wish the command to succeed (e.g., for use for warnings in workflows), you can include --fail-on-violation false. Note that it will still log FAIL Rule [rule name] on the command line.

robot verify --input asserted-equiv.owl \
  --queries equivalent.sparql \
  --fail-on-violation false \
  --output-dir results/

Error Messages

Verification Failed

At least one of the query you specifies returned results. The number of failures for each rule will be printed. A CSV file will be generated with the results that matched the rule.

Missing Query Error

You must specify at least one query to execute with --queries.