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

Reply via email to