0
我使用以下SPARQL查詢在耶拿打印一些信息:獲得打印日期時間
String qr = "PREFIX : <http://www.example.com/tempsensor#>\n" +
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \n"+
"SELECT \n"+
"?Place ?Temperature ?Date \n"+
"WHERE\n"+
"{ ?ind :locatedIn ?Place .\n " +
"?ind :measures ?Temperature .\n " +
"?ind :onDate ?Date .\n " +
"FILTER(regex(str(?Place),'Delhi', 'i'))\n"+
"FILTER (datatype(?Date) = xsd:dateTime)\n"+
"}";
輸出是:
--------------------------------------------------------------
| Place | Temperature | Date |
==============================================================
| :Delhi | 16 | "2014-10-02T03:20:10"^^xsd:dateTime |
不過,我不希望數據類型附加在Date列中。我需要輸出像
--------------------------------------------------------------
| Place | Temperature | Date |
==============================================================
| :Delhi | 16 | 2014-10-02T03:20:10 |
如何推薦我在查詢中指定此?
[SPARQL查詢?我怎麼會只有一個文字或字符串作爲結果]的可能重複(HTTP ://stackoverflow.com/questions/15724868/sparql-query-how-i-get-only-a-literal-or-string-as-result) – 2015-02-24 11:54:37