【问题标题】:Check RDF file syntax using jena使用 jena 检查 RDF 文件语法
【发布时间】:2017-03-06 03:31:41
【问题描述】:

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

【问题讨论】:

    标签: syntax sparql rdf apache-jena


    【解决方案1】:

    您可以将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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-03
      • 1970-01-01
      • 2018-09-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多