开发者

Create query in sparql using jena without hard coding the query? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_C百科 Closed 10 years ago.

Can any one tell me how to create a sparql query for dbpedia using jena program without hard coding the query.. I dont want to just store the query in string and to execute it... I have no idead how to make it as i am new to sparql... Could any one plz help me..

Thanks in advance


Can you add more detail on what you want to do i.e. is there a general template to your queries or particular types of queries you want to make?

Jena does have some support for substituting variables into prepared queries so you can hard code a template and then substitute values as desired based on your inputs. But whether this is applicable depends on what queries you want to make.

As a very simple solution you can just build your querystring by string concatenation based on your inputs and then use Jena to send that to DBpedia.

Edit

See Ian's answer to your other question which shows how to do substitution of values into prepared queries using Jena

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜