thinkmap.datasource.flatfile2
Class EntityModelIndexer

java.lang.Object
  extended by thinkmap.datasource.flatfile2.EntityModelIndexer

public class EntityModelIndexer
extends Object


Constructor Summary
EntityModelIndexer(FlatFileDataSource datasource, EntityModel em)
           
 
Method Summary
 void cancel()
           
protected  org.apache.lucene.document.Document createDocument(EntityWriter ew, String[] values)
           
 boolean isCurrent()
           
protected  void packModel(EntityModel em, URL url, long lastModified, org.apache.lucene.index.IndexWriter writer)
          Packs the entity
protected
<T> void
setValue(org.apache.lucene.document.Document doc, IFFColumnModel<T> col, String token, StringBuilder fulltext)
           
protected  void writeModeltoIndex(org.apache.lucene.index.IndexWriter writer)
          Writes an Entity Model to an index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityModelIndexer

public EntityModelIndexer(FlatFileDataSource datasource,
                          EntityModel em)
                   throws IOException
Throws:
IOException
Method Detail

cancel

public void cancel()

isCurrent

public boolean isCurrent()

writeModeltoIndex

protected void writeModeltoIndex(org.apache.lucene.index.IndexWriter writer)
                          throws IOException
Writes an Entity Model to an index. This method should only be called if creating the index from scratch or if the given Entity Model has been modified since it was last indexed.

Parameters:
writer -
em -
Throws:
Exception
IOException

createDocument

protected org.apache.lucene.document.Document createDocument(EntityWriter ew,
                                                             String[] values)
                                                      throws Exception
Throws:
Exception

setValue

protected <T> void setValue(org.apache.lucene.document.Document doc,
                            IFFColumnModel<T> col,
                            String token,
                            StringBuilder fulltext)
                 throws ParseException
Throws:
ParseException

packModel

protected void packModel(EntityModel em,
                         URL url,
                         long lastModified,
                         org.apache.lucene.index.IndexWriter writer)
                  throws IOException
Packs the entity

Parameters:
em -
f -
writer -
Throws:
IOException


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.