> Hi Dave, if we have a rule like > > if Person publications less than 10, Person is JuniorResearcher > if Person publications greater than 10, Person is SeniorResearcher > > If person publication is first less than 10, rules will assign him to > JuniorResearcher class but when it exceeds 10, becomes SeniorResearcher but > the JuniorResearcher also be there as rules does not replace the existed > value with new one. > > This was my query if we put the inferred model to a new model, will the > rules then be able to replace the previous data?
No no no, I think I already told you that the rule engine is monotonic, i.e. no data will be removed or changed but only new data will be added if the data matches a premise of a rule. Anything else has to be done by yourself in the application code. > > > On Sun, Apr 30, 2017 at 4:38 PM, Dave Reynolds <dave.e.reyno...@gmail.com> > wrote: > >> On 30/04/17 10:30, tina sani wrote: >> >>> I have a model Model1 with all data, having Jena rules. How can I put it >>> in >>> another model Model2 which may or may not have any data? >>> >> The way to add triples from one model to another is to use the >> unsurprisingly named "add" as any glance at the javadoc would tell you. >> >> model2.add( model1 ) >> >> If model1 is actually an InfModel with forward rules then what will get >> added to model2 is the base triples plus all inferred triples. >> >> Second, after putting the model in another model, would we able to replace >>> previous values/data with new one, generated using Jena rules? >>> >> Question is unclear. >> >> Once you have a model you and add or remove triples from it. >> >> You can use rules to generate triples. >> >> How you connect whatever bit of your code is using rules to whatever bit >> of your code is holding the data is up to you. There are no out-of-the-box >> rule builtins to allow you to fire a rule in one model and assert results >> into another model if that's what you mean. >> >> Dave >> >> -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center