[英]Whats wrong with this SPARQL query?
String sparql = "";
sparql+= "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n";
sparql+= "PREFIX i: <http://evolizer.org/ontologies/seon/2010/09/softwaremetrics.owl#>\n";
sparql+= "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n";
sparql+="SELECT ?metric ?value\n";
sparql+="WHERE {\n";
sparql+="?metric rdf:type i:SoftwareDesignMetric .\n";
sparql+="?metric i:hasName McCabe .\n";
sparql+= "?metric i:hasValue ?value \n";
sparql+="}\n";
通過執行我得到此異常:
A first chance exception of type 'System.Net.WebException' occurred in System.dll
exception when sending query:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX i: <http://evolizer.org/ontologies/seon/2010/09/softwaremetrics.owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?metric ?value
WHERE {
?metric rdf:type i:SoftwareDesignMetric .
?metric i:hasName McCabe .
?metric i:hasValue ?value
}
問題必須是查詢本身,因為對同一服務器的其他查詢正在運行。
我還發現了一個驗證器,該驗證器提示查詢出了什么問題:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.