使用 jena 检查 RDF 文件语法
Check RDF file syntax using jena
我有一个我写的 .ttl
文件。我在 mac 环境中。我想知道如何使用 apache jena 检查文件是否有效。执行此操作需要哪些终端命令?我已经下载了apache jena包。
您可以将 riot
与 $PATH_TO_JENA/bin/riot --validate $PATH_TO_FILE
一起使用
riot [--time] [--check|--noCheck] [--sink] [--base=IRI] [--out=FORMAT] [--compress] file ...
Parser control
--sink Parse but throw away output
--syntax=NAME Set syntax (otherwise syntax guessed from file extension)
--base=URI Set the base URI (does not apply to N-triples and N-Quads)
--check Addition checking of RDF terms
--strict Run with in strict mode
--validate Same as --sink --check --strict
--rdfs=file Apply some RDFS inference using the vocabulary in the file
--nocheck Turn off checking of RDF terms
--stop Stop parsing on encountering a bad RDF term
Output control
--output=FMT Output in the given format, streaming if possible.
--formatted=FMT Output, using pretty printing (consumes memory)
--stream=FMT Output, using a streaming format
--compress Compress the output with gzip
Time
--time Time the operation
Symbol definition
--set Set a configuration symbol to a value
General
-v --verbose Verbose
-q --quiet Run with minimal output
--debug Output information for debugging
--help
--version Version information
我有一个我写的 .ttl
文件。我在 mac 环境中。我想知道如何使用 apache jena 检查文件是否有效。执行此操作需要哪些终端命令?我已经下载了apache jena包。
您可以将 riot
与 $PATH_TO_JENA/bin/riot --validate $PATH_TO_FILE
riot [--time] [--check|--noCheck] [--sink] [--base=IRI] [--out=FORMAT] [--compress] file ...
Parser control
--sink Parse but throw away output
--syntax=NAME Set syntax (otherwise syntax guessed from file extension)
--base=URI Set the base URI (does not apply to N-triples and N-Quads)
--check Addition checking of RDF terms
--strict Run with in strict mode
--validate Same as --sink --check --strict
--rdfs=file Apply some RDFS inference using the vocabulary in the file
--nocheck Turn off checking of RDF terms
--stop Stop parsing on encountering a bad RDF term
Output control
--output=FMT Output in the given format, streaming if possible.
--formatted=FMT Output, using pretty printing (consumes memory)
--stream=FMT Output, using a streaming format
--compress Compress the output with gzip
Time
--time Time the operation
Symbol definition
--set Set a configuration symbol to a value
General
-v --verbose Verbose
-q --quiet Run with minimal output
--debug Output information for debugging
--help
--version Version information