Prefix Generator#
Overview#
The prefix generator can be used to create a mapping between prefixes and URIs or IRIs. Prefixes
are essentially shorthands or aliases to these longer URIs or IRIs. The aliases and their corresponding
expansions are specified as key value pairs under the prefixes
section of a LinkML schema.
You can read more about prefixes and
URIs, IRIs and CURIEs in the
URIs and Mappings section of
the docs.
Example Output#
personinfo.json personinfo.tsv
To generate a JSON style mapping, run:
gen-prefix-map examples/personinfo.yaml --output examples/personinfo.json
To generate a simple TSV style mapping, run:
gen-prefix-map examples/personinfo.yaml --output examples/personinfo.tsv
If you want to simply view the data in the format of your choice, use the --format
option.
Docs#
Command Line#
gen-prefix-map#
Generate jsonld @context definition from LinkML model
gen-prefix-map [OPTIONS] YAMLFILE
Options
- --base <base>#
Base URI for model
- -o, --output <output>#
Output file path
- -V, --version#
Show the version and exit.
- -f, --format <format>#
Output format
- Default:
'json'
- Options:
json | tsv
- --metadata, --no-metadata#
Include metadata in output
- Default:
True
- --useuris, --metauris#
Use class and slot URIs over model uris
- Default:
True
- -im, --importmap <importmap>#
Import mapping file
- --log_level <log_level>#
Logging level
- Default:
'WARNING'
- Options:
CRITICAL | ERROR | WARNING | INFO | DEBUG
- -v, --verbose#
Verbosity. Takes precedence over –log_level.
- --mergeimports, --no-mergeimports#
Merge imports into source file (default=mergeimports)
- --stacktrace, --no-stacktrace#
Print a stack trace when an error occurs
- Default:
False
Arguments
- YAMLFILE#
Required argument