Imported Model Update Issue

4 views
Skip to first unread message

Arthur

unread,
Aug 26, 2011, 12:54:16 PM8/26/11
to jenabean-dev
I have two OntModels A and B. A imports B. When I add triples to B,
they are not accessible in A, unless I close A and reload A. How of I
make A aware of the latest changes in B?

Thanks!

Taylor Cowan

unread,
Aug 26, 2011, 10:16:39 PM8/26/11
to jenabe...@googlegroups.com
Hi Arthur,

hmmm, I'll have to review Jena docs to answer this. Is this a symptom
of using Jenabean to access the model, or is it behavior of the
underlying store?

I think there is a way to solve this is with the jena "assembly" or
assembler configuration. This reminds me of the JSP @import
tag...it's a static one time import when the wrapping page is
compiled. Similarly, I think model A is importing model B as a static
import at load time, however, I'm sure there is a way to nest models
such that changes to B are reflected in A.

Please allow me some time to research...I've not been coding in Jena
much this year, but I know there is a solution to your problem. Andy
Seaborn or any of the other Jena team might answer this question
quickly on the Jena groups as well.

> --
> You received this message because you are subscribed to the Google Groups "jenabean-dev" group.
> To post to this group, send email to jenabe...@googlegroups.com.
> To unsubscribe from this group, send email to jenabean-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jenabean-dev?hl=en.
>
>

Arthur

unread,
Aug 29, 2011, 12:23:52 PM8/29/11
to jenabean-dev
Thanks Taylor. I should send this to the Jena group.

Taylor Cowan

unread,
Aug 30, 2011, 4:29:31 PM8/30/11
to jenabe...@googlegroups.com
Arthur:

see http://jena.sourceforge.net/how-to/model-factory.html

createInfModel(Reasoner reasoner, Model base) creates a model with a
base model. changes to the base model are seen in the inference
model.

or just a simple ontology model:
createOntologyModel(OntModelSpec spec, Model base)

Taylor

Reply all
Reply to author
Forward
0 new messages