rule - jena reasoning on 2 dataset and add new entity in consequence -


i have result binding in jena query solution(say sol1: user=u1, location=loc1, locationtype=type1) , want use dataset extend result binding using set of jena rules. in fact, having sol1 , having loc1 location:ispartof loc2 loc2 rdf:type loc2type in dataset, want add new solution result set:

sol2: user1=u1, location=loc2, locationtype=loc2type

for that, need add solution set dataset, write rule @prefix pre: <http://jena.hpl.hp.com/prefix#>. [rule1: (?sol pre:user ?a) (?sol pre:location ?b) (?sol pre:lcationtype ?c) (?b location:ispartof ?d) (?d rdf:type ?type) -> (sol2 pre:user ?a) (sol2 pre:location ?d) (sol2 pre:locationtype ?type) ] inference based on above rule.afterward extract solutions dataset need query dataset with

@prefix pre: <http://jena.hpl.hp.com/prefix#>. select * {?sol pre:user ?a. ?sol pre:location ?b. ?sol pre:lcationtype ?c.}

now problem is

1) there way prevent adding solutions big dataset writing resoning rule on 2 datasets?

2)how individually name each new solution in rule consequence?

thanks.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -