}
static IndexLARQ buildTitleIndex(Model model, String datafile)
{
// ---- Read and index just the title strings.
IndexBuilderString larqBuilder = new IndexBuilderString(DC.title) ;
// Index statements as they are added to the model.
model.register(larqBuilder) ;
// To just build the index, create a model that does not store statements
// Model model2 = ModelFactory.createModelForGraph(new GraphSink()) ;
FileManager.get().readModel(model, datafile) ;
// ---- Alternatively build the index after the model has been created.
// larqBuilder.indexStatements(model.listStatements()) ;
// ---- Finish indexing
larqBuilder.closeWriter() ;
model.unregister(larqBuilder) ;
// ---- Create the access index
IndexLARQ index = larqBuilder.getIndex() ;
return index ;
}