incubator-jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Castagna <>
Subject Adding LARQ to Fuseki via DatasetAssemblerTDB
Date Tue, 26 Apr 2011 18:17:13 GMT
today, I had a go at adding LARQ to DatasetAssemblerTDB.

We can use reflection in TDB's DatasetAssemblerTDB so that we do not
need to add a dependency on Lucene to TDB (see patch attached).

This works, however I am not satisfied by logging and exception handling.
I did not want to pollute the console when running TDB tests, however now
when there is a problem it's not as easy to understand what's going wrong.

Also, I am not so sure how we are suppose to .close() things.

My ultimate goal was to use LARQ from Fuseki, so, I tried to use the
modified DatasetAssemblerTDB from Fuseki.

I noticed a problem with Lucene write.lock file and after some investigation
I found that the DatasetAssemblerTDB was called twice. This could be a

Index: src/main/java/org/openjena/fuseki/
--- src/main/java/org/openjena/fuseki/	(revision 8563)
+++ src/main/java/org/openjena/fuseki/	(working copy)
@@ -183,12 +183,6 @@
                  throw new CmdException(argPort.getKeyName()+" : bad port number: "+portStr)
-        else
-        {
-            Dataset ds = modDataset.createDataset() ;
-            if ( ds != null )
-                dsg = ds.asDatasetGraph() ;
-        }

          if ( dsg == null )
              throw new CmdException("No dataset defined: "+argUsage) ;

After I removed these lines from I was able to use LARQ
successfully simply adding a ja:textIndex "..." to my assembler file:

<#dataset> rdf:type tdb:DatasetTDB ;
   ja:textIndex "/path/to/lucene/index" ;

I'd really like to use LARQ (the one available as a separate module)
from Fuseki and this is the best way I found to do it.

What do you think?


View raw message