Can SPARQL (Jena) UPDATEs be parameterized by collections of literals (instead of literals)?

╄→尐↘猪︶ㄣ 提交于 2019-12-10 09:56:32

问题


Can I call a parameterized SPARQL UPDATE (as in Jena's ParameterizedSparqlString) to set a property to several e.g. literal values?

For instance, I have:

Set<String> object = new HashSet<String>(Arrays.asList("literal1", "literal2"));

and would like to use a SPARQL update such as:

INSERT { [] property ?object } WHERE {}

to build these RDF statements:

_:SUBJECT property "literal1" .
_:SUBJECT property "literal2" .

Does Jena support this kind or parametrization (the signature of ParameterizedSparqlString suggests no) or will I have to build the SPARQL UPDATE by looping over the set and concatenating strings?

来源:https://stackoverflow.com/questions/27822769/can-sparql-jena-updates-be-parameterized-by-collections-of-literals-instead-o

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!