Output format in Jena Fuseki server

浪子不回头ぞ 提交于 2019-12-13 01:02:37

问题


Given this command:

prefix dm:  <http://one.example/>
SELECT ?pID
WHERE
{
 ?pID dm:hasDName "xxxvvvII" .
} 

The arq engine outputs the following:

-------------------
| pID           |
===================
| dm:C002172      |
-------------------

The fuseki server outputs the following:

{
"head": {
"vars": [ "pID" ]
} ,
"results": {
"bindings": [
  {
    "pID": { "type": "uri" , "value": "http://one.example/C002172" }
  }
 ]
}
}

First question: how can I make the Fuseki server output the result in a more readable way with out the all braces and other token?

Second question: how can I delete datasets from Fuseki server, There is no such option in the control panel and I searched online. But all I can find is this: http://jena.apache.org/documentation/serving_data/soh.html

I tried these command in the terminal but they didn't actually work?


回答1:


  1. Ask for format text/plain (content negotiation or ?output=text). Also CSV or TSV formats may be useful to you.

  2. Re: deleting datasets. Not in the current release. You can empty them though, either each graph as in SOH DELETE or PUT of empty content, or PUT empty content (e.g. N-Quads) to http://localhost:3030/dataset/ using curl, wget.



来源:https://stackoverflow.com/questions/31307532/output-format-in-jena-fuseki-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!