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

Export Prefixes

You can print or save the current prefixes using the export-prefixes command:

robot --prefixes foo.json \
  --prefix "bar: http://bar#" \
  --prefix "baz: http://baz#" \
  export-prefixes

This prints the default prefixes plus the user-added prefixes in JSON-LD format The prefixes are contained within a @context that can be used to resolve JSON-LD compact IRIs. For the above, command, the printed output would look something like:

{
  "@context": {
    "obo": "http://purl.obolibrary.org/obo/",
    "oboInOwl": "http://www.geneontology.org/formats/oboInOwl#",
    ...
    "foo": "http://foo#",
    "bar": "http://bar#",
    "baz": "http://baz#"
  }
}

You can also include an output to write the prefixes to a file:

robot --noprefixes --prefix "foo: http://foo#" \
  export-prefixes --output results/foo.json

The --noprefixes flag is used in this example, meaning the default prefixes are not included. For more details on adding prefixes, see prefixes.