1
我想在本體中動態添加信息。我成功地與使用SPARQL將標籤和註釋標籤插入到本體中
INSERT DATA {
GRAPH <http://www.semanticweb.org/alexandrina/ontologies/2013/3/myOntology>
{
<http://www.semanticweb.org/alexandrina/ontologies/2013/3/myOntology#Cough>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.semanticweb.org/alexandrina/ontologies/2013/3/myOntology#Diseases>
}
}
添加這樣的事情
<myOntology:Diseases rdf:about="&myOntology;Cough">
<rdf:type rdf:resource="&myOntology;Diseases" />
</myOntology:Diseases>
但現在我想添加標籤或註釋屬性。例如,要獲得
<rdfs:comment xml:lang="en">Cough</rdfs:comment>
<rdfs:comment xml:lang="ro">Tusea</rdfs:comment>
我試了很多查詢,但沒有成功。這樣的查詢應該是什麼?
只是說明有關的例子中,RDF/XML語法' ... myOntology:疾病>'已經說過'&myOntology;咳嗽rdf:輸入myOntology:疾病',所以內部的 '是多餘的。 –
歡迎來到Stack Overflow!我發現你已經發布了一些問題,只是想讓你知道,如果他們爲你工作,你可以[接受答案](http://meta.stackexchange.com/a/5235/225437)讓其他用戶知道答案適用於您的問題(並獎勵具有某些聲望點的答案)。在這種情況下,提供的SPARQL查詢是否適合您?如果不是,你能讓我們知道什麼沒有起作用嗎,也許它可以修復? –