Output format in Jena Fuseki server

2019-08-13 17:13发布

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条回答
迷人小祖宗
2楼-- · 2019-08-13 17:23
  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.

查看更多
登录 后发表回答