org.apache.jena.larq
Class IndexBuilderBase

java.lang.Object
  extended by org.apache.jena.larq.IndexBuilderBase
All Implemented Interfaces:
IndexBuilder
Direct Known Subclasses:
IndexBuilderNode

public class IndexBuilderBase
extends Object
implements IndexBuilder

Root class for index creation.


Constructor Summary
IndexBuilderBase()
          Create an in-memory index
IndexBuilderBase(File fileDir)
          Create an on-disk index
IndexBuilderBase(org.apache.lucene.index.IndexWriter existingWriter)
          Manage a Lucene index that has already been created
IndexBuilderBase(String fileDir)
          Create an on-disk index
 
Method Summary
 boolean avoidDuplicates()
           
 void closeWriter()
          Close the writing index permanently.
 void closeWriter(boolean optimize)
          Close the writing index permanently.
 void flushWriter()
          Flush index - does a Lucene optimize
 IndexLARQ getIndex()
          Get a search index used by LARQ
 void setAvoidDuplicates(boolean avoidDuplicates)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexBuilderBase

public IndexBuilderBase()
Create an in-memory index


IndexBuilderBase

public IndexBuilderBase(org.apache.lucene.index.IndexWriter existingWriter)
Manage a Lucene index that has already been created


IndexBuilderBase

public IndexBuilderBase(File fileDir)
Create an on-disk index


IndexBuilderBase

public IndexBuilderBase(String fileDir)
Create an on-disk index

Method Detail

avoidDuplicates

public boolean avoidDuplicates()

setAvoidDuplicates

public void setAvoidDuplicates(boolean avoidDuplicates)

closeWriter

public void closeWriter()
Close the writing index permanently. Optimizes the index.

Specified by:
closeWriter in interface IndexBuilder

closeWriter

public void closeWriter(boolean optimize)
Close the writing index permanently.

Parameters:
optimize - Run Lucene optimize on the index before closing.

flushWriter

public void flushWriter()
Description copied from interface: IndexBuilder
Flush index - does a Lucene optimize

Specified by:
flushWriter in interface IndexBuilder

getIndex

public IndexLARQ getIndex()
Get a search index used by LARQ

Specified by:
getIndex in interface IndexBuilder


Licenced under the Apache License, Version 2.0