On 21/02/12 20:49, Loic R Julien wrote:
I am using TDB 0.8.9 and Jena 2.6.4
1- I wonder if I initialize TDB correctly. I currently do a very
straightforward call to create my dataset. However, I do see a warning
when TDB initialize.
Code
TDBFactory.createDataset (Dir location);
Warning
WARN [Start Level Event Dispatcher] (SetupTDB.java:755) - No BGP
optimizer
Best is to put an optimizer file
http://incubator.apache.org/jena/documentation/tdb/optimizer.html
fixed.opt does an adequate job in many cases.
but you can call TDB.setOptimizerWarningFlag(false)
2- I serialize some "internal" RDF models with relative URIs. As such, I
pass in a base URI of "" when reconstructing the corresponding Model
instance so that I can leave those untouched. I do end up, however, with
Warning messages. Is there a way to avoid printing out those warnings?
Code
this.model = ModelFactory.createDefaultModel();
RDFReader reader = this.model.getReader();
reader.read(this.model, new ByteArrayInputStream(rdf.getBytes()),
"");
Warning
WARN [1527929618@qtp-940521487-3]
(RDFDefaultErrorHandler.java:36) - file:///..-Data Removed-..(line 1
column 443): {W130} Base URI is "", relative URIs left as relative.:<
..-Data Removed-..>
This is not a TDB issue.
RDF really should have absolute URIs - set the base to be something. At
least http://example.org/
(I think RIOT will resolve "" and so you get an absolute file: URI
Andy
I thank you for your help,
~Loic