Andy Seaborne wrote:
Pondering on what the LARQ assembler might look like ...
1/ Is the index associated with a graph or a dataset? or are both
possible? (I think my pref is dataset)
2/ Here's a assembler for a dataset of a default graph and named graph.
<#ds1> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model1> ;
rdfs:label "Dataset 1" ;
ja:namedGraph
[ ja:graphName <http://example.org/name1> ;
ja:graph <#model1> ] ;
ja:namedGraph
[ ja:graphName <http://example.org/name2> ;
ja:graph <#model2>
] ;
.
<#model1> rdf:type ja:MemoryModel ;
rdfs:label "Model(plain)" ;
ja:content [ ja:externalContent <file:FILE-1.ttl> ] ;
ja:content [ ja:externalContent <file:FILE-2.ttl> ] ;
.
LARQ adds:
<#ds1> rdf:type ja:RDFDataset ;
larq:textIndex "Location of Lucene data" ;
...
to add it to a dataset.
Hi,
I've never extended the configuration using the Jena assembler mechanism.
So, I had a look at it, however I am not sure I understand how get a reference
to the RDFDataset the larq:textIndex has been used with.
LARQ already had an AssemblerLARQ class, which I diligently stolen:
https://jena.svn.sourceforge.net/svnroot/jena/LARQ/trunk/src/main/java/org/apache/jena/larq/assembler/AssemblerLARQ.java
AssemblerLARQ builds a IndexLARQ, however I would like to *attach* it to the
RDF Dataset so that it listens for statements added or removed and it keeps
the Lucene index in sync.
How do I get a reference to the RDF Dataset?
There is clearly something obvious I am missing here, but I am stuck.
If there is an example which does something similar, please, point me at it.
Thank you,
Paolo
This *attaches* it, it does not *build* it.
Andy