thinkmap.datasource.flatfile2
Class EntityModelIndexer
java.lang.Object
thinkmap.datasource.flatfile2.EntityModelIndexer
public class EntityModelIndexer
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityModelIndexer
public EntityModelIndexer(FlatFileDataSource datasource,
EntityModel em)
throws IOException
- Throws:
IOException
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.