On 03/03/15 17:19, Fabio Ricci wrote:
Dear Jena Community
I have developed a theaurus supported search - available via web - and
now I would like to extend it and realize an ontology driven search,
i.e. on some given keywords match classes and output the attributes
and relations and properties of the corresponding classes as
semantical facets.
Right at the moment for the RDF thesaurus search I am using a pure
java RDF Store through its java sail interface. Unfortunately this RDF
store is able to read an OWL TTL file but something must then be
missing to process it when *I try to access via SPARQL the property
values of the matched classes*.
That's a question for the sesame users list.
Ergo I have to use a more sofisticated tool like protege framework or
jena to access OWL classes inside a model. I tried loading the OWL
file
(http://webprotege.stanford.edu/#Edit:projectId=28f5a3a4-5896-42e8-8ea0-fe91aa7187a6)
using fuseki, it loaded "some" triples and the load process was error
free but at the end the triples (1'321'477) counted were less then the
half then with this RDF tool (using RDFS inference) and by using
SPARQL I still could not achieve to combine in fuseki object
properties with classes and output class property values.
You'll need an assembler server configuration description to enable OWL
reasoning. Just loading data into Fuseki does not give you any inference.
So I decided to undertake the Jena model way, where a java Jena model
is instantiated from an OWL file and queried/traversed on demand.
It should run on tomcat - accepting queries - identifying properties,
outputing its values..
So my questions are:
1) What is the best way to implement a jena owl model intantiation on
tomcat? Is there a way to "compile" a model to some format so the
instantiation will be speedy (we speak of about 3 million triples) ?
In case the model won't fit to the main memory, which options would
you suggest to use? (The RDF STore I use makes use of a BTree which
stored in a compressed file - so it is not in main memory but quite fast).
TDB uses B+Trees.
Inference over databases can be slow, though at 3 million, enough might
be cached in RAM that it just works.
You might like to load it once (with enough RAM for Java heap) and dump
the inferred model. This depends on what inference level you use.
2) Where should the Jena OWL Model be instantiated on tomcat in order
to get instantiated once and beeing used at every request? I am
thinking here in putting the instantiation of the model in the init()
method of my servlet and using it in the get().
Thank you very much in advance!
Regards
Fabio