我需要一些帮助来删除fuseki server
例如,如何删除此条目?
<http://person/Test1>
<http://purl.org/dc/elements/1.1/name> "Test1" ;
这是我尝试过的,但它不起作用......
public void deletePerson(String[] personalData ) {
String personURI = "http://localhost:3030/Date";
String name = personalData[0];
String query = "DELETE WHERE { <http://person/" + formattedName + "> }";
QueryExecution qe = QueryExecutionFactory.sparqlService(
"http://localhost:3030/Date/query",
"PREFIX dc: <http://purl.org/dc/elements/1.1/> " + query);
}
线程中的异常&#34; AWT-EventQueue-0&#34; com.hp.hpl.jena.query.QueryParseException:遇到&#34; &#34; DELETE WHERE&#34;&#34;在第1栏第47栏。 期待其中一个:
&#34;基础&#34; ...
&#34;前缀&#34; ...
&#34;选择&#34; ...
&#34;描述&#34; ...
&#34;构造&#34; ...
&#34;问&#34; ......
答案 0 :(得分:1)
我认为你应该使用UpdateExecutionFactory 像这样的东西
library(sqldf)
> df=NULL
> df$col26=sample(100,100,T)
> df=as.data.frame(df)
> df2=sqldf("select count(col26) as col27,col26 from df group by col26")
> df2=as.data.frame(df2)
> str(df)
'data.frame': 100 obs. of 1 variable:
$ col26: int 21 49 99 100 46 72 32 84 44 100 ...
> str(df2)
'data.frame': 57 obs. of 2 variables:
$ col27 : int 1 1 1 3 1 1 1 1 4 1 ...
$ col26 : int 6 9 10 11 12 14 16 17 21 22 ...
> df3=merge(df2,df,by="col26",all.y=TRUE)
> str(df3)
'data.frame': 100 obs. of 2 variables:
$ col26 : int 6 9 10 11 11 11 12 14 16 17 ...
$ col27 : int 1 1 1 3 3 3 1 1 1 1 ...