我尝试使用REST API导入GraphDB中的数据,并使用curl示例:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '
{
"baseURI": "string",
"context": "string",
"data": "string",
"forceSerial": true,
"format": "string",
"message": "string",
"name": "string",
"parserSettings": {
"failOnUnknownDataTypes": boolean,
"failOnUnknownLanguageTags": boolean,
"normalizeDataTypeValues": boolean,
"normalizeLanguageTags": boolean,
"preserveBNodeIds": boolean,
"stopOnError": boolean,
"verifyDataTypeValues": boolean,
"verifyLanguageTags": boolean
},
"replaceGraphs": [
"string"
],
"status": "PENDING",
"timestamp": 0,
"type": "string"
}'
'<base_url>/rest/data/import/upload/<repo_id>/url'
听起来不错,但某些参数似乎很明显,其他参数却不然。例如,“类型”与“格式”或“数据”与“消息”。有没有人在使用所有或大多数参数的工作示例,以便我猜出它是如何工作的?
curl -X POST --header'Content-Type:application / json'--header'Accept:application / json'-d'
{“ baseURI”:“ null”或另一个有效的IRI,例如http://example.org,
“ context”:“指定要在其中导入数据的图形名称,或将其保留为空以在默认图形中导入数据”,
“数据”:“ https://www.w3.org/TR/owl-guide/wine.rdf”,
“ forceSerial”:true,(如果为true,则串行导入数据,否则为并行)
“格式”:“文本/海龟”或其他有效格式,
“消息”:“任何”,
“ name”:“要输入的名称”,
“ parserSettings”:{“ failOnUnknownDataTypes”:布尔值,“ failOnUnknownLanguageTags”:布尔值,“ normalizeDataTypeValues”:布尔值,“ normalizeLanguageTags”:布尔值,“ preserveBNodeIds”:布尔值,“ stopOnError”:布尔值,“ verifyDataTypeValues”:布尔值,“ verifyLanguageTags”:布尔值},“ replaceGraphs”:[“串”],“ status”:“ PENDING”,“时间戳记”:0,“ type”:“字符串”}''/ rest / data / import / upload // url'
也可以在这里找到更多信息: