org.apache.maven.index.updater
Class IndexDataReader

java.lang.Object
  extended by org.apache.maven.index.updater.IndexDataReader

public class IndexDataReader
extends Object

An index data reader used to parse transfer index format.

Author:
Eugene Kuleshov

Nested Class Summary
static class IndexDataReader.IndexDataReadResult
          An index data read result holder
static interface IndexDataReader.IndexDataReadVisitor
          Visitor of indexed Lucene documents.
 
Constructor Summary
IndexDataReader(InputStream is)
           
 
Method Summary
 org.apache.lucene.document.Document readDocument()
           
 long readHeader()
           
 IndexDataReader.IndexDataReadResult readIndex(IndexDataReader.IndexDataReadVisitor visitor, IndexingContext context)
          Reads index content by using a visitor.
 IndexDataReader.IndexDataReadResult readIndex(org.apache.lucene.index.IndexWriter w, IndexingContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexDataReader

public IndexDataReader(InputStream is)
                throws IOException
Throws:
IOException
Method Detail

readIndex

public IndexDataReader.IndexDataReadResult readIndex(org.apache.lucene.index.IndexWriter w,
                                                     IndexingContext context)
                                              throws IOException
Throws:
IOException

readHeader

public long readHeader()
                throws IOException
Throws:
IOException

readDocument

public org.apache.lucene.document.Document readDocument()
                                                 throws IOException
Throws:
IOException

readIndex

public IndexDataReader.IndexDataReadResult readIndex(IndexDataReader.IndexDataReadVisitor visitor,
                                                     IndexingContext context)
                                              throws IOException
Reads index content by using a visitor.
The visitor is called for each read documents after it has been populated with Lucene fields.

Parameters:
visitor - an index data visitor
context - indexing context
Returns:
statistics about read data
Throws:
IOException - in case of an IO exception during index file access


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.