Joshua TAYLOR wrote:
On Fri, Sep 14, 2012 at 1:48 PM, Dan B. <d...@kempt.net> wrote:
Are inference results supposed to be the same regardless of the order of
wrapping a base model in an inference model vs. adding statements to the
wrapped base model?


I'm getting different inference results depending on whether I:
a) add statements to a base model before wrapping it in an inference
    model, or
b) wrap a base model in an inference model before adding statements
    to that base model.

...
...

There may be some reason that you want to modify the base model rather
than the inference model,but I will point out that if you make the
changes through wrappedBefore rather than through given, both models
(without any explicit rebinding) will produce 109 statements.

It sounds like you're saying that modifying a model that wraps another
model will modify that other (wrapped) model.  Is that really right?
(It seems backwards.)  (Which two (of my three models) did you mean by
"both"?)


I'm not a Jena developer, so I can't make any answer about whether
there's a bug in the iteration code, but rebinding your inference
models when there may have been a change to the underlying data is
typically a good idea.  I hope it helps in your case.

My impression from various documentation, and from some listener
callback code I've seen in models, was that when one model wraps
another model, that wrapping model gets registered as a listener
for changes on that second (wrapped) model.

Therefore, my impression was that adding statements to the wrapped
model should cause the wrapping model to get updated automatically
(at least by the next time any call was made to observe its state).

The documentation I've seen so far is consistent with that, but
does say anything to confirm or refute that.


Can anyone point me to documentation that specifies which way things
work (e.g., specifies something about model listening, updating,
caching, etc.)?



Thanks,
Daniel



Reply via email to