com.metamatrix.core.index
Interface IIndexer


public interface IIndexer

An IIndexer indexes ONE document at each time. It adds the document names and the words references to an IIndex. Each IIndexer can index certain types of document, and should not index the other files.


Method Summary
 java.lang.String[] getFileTypes()
          Returns the file types the IIndexer handles.
 void index(IDocument document, IIndexerOutput output)
          Indexes the given document, adding the document name and the word references to this document to the given IIndex.The caller should use shouldIndex() first to determine whether this indexer handles the given type of file, and only call this method if so.
 void setFileTypes(java.lang.String[] fileTypes)
          Sets the document types the IIndexer handles.
 boolean shouldIndex(IDocument document)
          Returns whether the IIndexer can index the given document or not.
 

Method Detail

getFileTypes

java.lang.String[] getFileTypes()
Returns the file types the IIndexer handles.


index

void index(IDocument document,
           IIndexerOutput output)
           throws java.io.IOException
Indexes the given document, adding the document name and the word references to this document to the given IIndex.The caller should use shouldIndex() first to determine whether this indexer handles the given type of file, and only call this method if so.

Throws:
java.io.IOException

setFileTypes

void setFileTypes(java.lang.String[] fileTypes)
Sets the document types the IIndexer handles.


shouldIndex

boolean shouldIndex(IDocument document)
Returns whether the IIndexer can index the given document or not.



Copyright © 2009. All Rights Reserved.