Syntax 使用jena检查RDF文件语法

Syntax 使用jena检查RDF文件语法,syntax,sparql,rdf,apache-jena,Syntax,Sparql,Rdf,Apache Jena,我有一个我写的.ttl文件。我在mac环境上。我想知道如何使用ApacheJena来检查文件是否有效。执行此操作需要哪些终端命令?我已经下载了apache jena数据包。您可以将riot与$PATH\u TO_jena/bin/riot一起使用--validate$PATH\u TO_FILE riot [--time] [--check|--noCheck] [--sink] [--base=IRI] [--out=FORMAT] [--compress] file ... Parser

我有一个我写的
.ttl
文件。我在mac环境上。我想知道如何使用ApacheJena来检查文件是否有效。执行此操作需要哪些终端命令?我已经下载了apache jena数据包。

您可以将
riot
$PATH\u TO_jena/bin/riot一起使用--validate$PATH\u 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