jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Dickinson <...@epimorphics.com>
Subject Re: Reasoners, Datasets, Models
Date Mon, 13 Dec 2010 13:43:25 GMT
Hi Benson,
On 11/12/10 01:02, Benson Margulies wrote:
> Note that 'baseModel' is a MODEL, not a Dataset. I want to query over
> all the graphs (as I can by passing a TDB dataset rather than a model
> into the query universe.) Even if I set TDB.symUnionDefaultGraph,
> passing the default model from the TDB doesn't work.
I updated your example and pushed the changes to github:

https://github.com/ephemerian/jena-tdb-ont-example

I made two main changes:

* I removed the JenaStore class. As far as I could tell, most of the
responsibilities of this class for managing tdb files are duplicates of
existing command line tools. In a general application, there might well
be a need for a proxy- or decorator-pattern wrapper, but for a simple
illustrative example the additional complexity is, I believe, not
helpful. So I've moved responsibility for loading the named graphs in
the store into src/main/script/init-demo.

* I simplified the code to create an ontology inference model from the
underlying TDB store. Note that the code could be simplified even more
if you didn't use inference at this stage, since
QueryExecutionFactory.create() can take a Dataset as well as a Model. In
general, inference will work much better against in-memory models: using
inference directly over a disk-based store is a pattern that's only
likely to work efficiently for quite small models. If you think that
you're going to need to work with large models and inference, we can
give you advice on possible options.

Ian


-- 
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:ian@epimorphics.com        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
              Portishead, Bristol BS20 6PT, UK


Mime
View raw message