thinkmap.datasource.flatfile2
Class EntityWriter

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

public class EntityWriter
extends Object


Constructor Summary
EntityWriter(FlatFileDataSource ds, EntityModel model)
           
 
Method Summary
protected  org.apache.lucene.search.Query generateEntityQuery(EntityId entityId)
           
protected  org.apache.lucene.search.Query generateRelatedQuery(EntityId entityId)
           
protected  org.apache.lucene.search.Query generateRelatedQuery(EntityId entityId, boolean outgoing)
           
 IFFColumnModel<?>[] getKeyColumns()
           
protected  List<String> getKeyNames(String modelName)
           
protected  List<EntityWriter> getRelatedEdges(boolean outgoing)
           
 boolean isEdge()
           
 EntityId parseEntityId(String searchString)
           
protected  EntityId readEndpointId(String type, EdgeColumnModel<?>[] keys, org.apache.lucene.document.Document doc)
           
 void writeEdge(IEntityHandler callback, org.apache.lucene.document.Document doc, EntityId incoming)
           
 void writeEdge(IEntityHandler callback, org.apache.lucene.document.Document doc, EntityId incoming, Float score, Integer hit)
           
protected  void writeId(IEntityHandler callback, org.apache.lucene.document.Document doc)
          Outputs the Id of an entity
 void writeNode(IEntityHandler callback, org.apache.lucene.document.Document doc)
           
 void writeNode(IEntityHandler callback, org.apache.lucene.document.Document doc, Float score, Integer hit)
           
protected  void writeProperties(IEntityHandler callback, org.apache.lucene.document.Document doc)
           
protected  void writeRelated(IEntityHandler callback, EntityWriter ew, EntityId id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityWriter

public EntityWriter(FlatFileDataSource ds,
                    EntityModel model)
Method Detail

isEdge

public boolean isEdge()

writeEdge

public void writeEdge(IEntityHandler callback,
                      org.apache.lucene.document.Document doc,
                      EntityId incoming)
               throws IOException
Throws:
IOException

writeEdge

public void writeEdge(IEntityHandler callback,
                      org.apache.lucene.document.Document doc,
                      EntityId incoming,
                      Float score,
                      Integer hit)
               throws IOException
Throws:
IOException

writeRelated

protected void writeRelated(IEntityHandler callback,
                            EntityWriter ew,
                            EntityId id)
                     throws IOException
Throws:
IOException

writeNode

public void writeNode(IEntityHandler callback,
                      org.apache.lucene.document.Document doc)

writeNode

public void writeNode(IEntityHandler callback,
                      org.apache.lucene.document.Document doc,
                      Float score,
                      Integer hit)

readEndpointId

protected EntityId readEndpointId(String type,
                                  EdgeColumnModel<?>[] keys,
                                  org.apache.lucene.document.Document doc)

getKeyNames

protected List<String> getKeyNames(String modelName)

writeId

protected void writeId(IEntityHandler callback,
                       org.apache.lucene.document.Document doc)
Outputs the Id of an entity

Parameters:
model -
callback -
doc -
Throws:
Exception

writeProperties

protected void writeProperties(IEntityHandler callback,
                               org.apache.lucene.document.Document doc)

generateRelatedQuery

protected org.apache.lucene.search.Query generateRelatedQuery(EntityId entityId)
                                                       throws Exception
Throws:
Exception

generateRelatedQuery

protected org.apache.lucene.search.Query generateRelatedQuery(EntityId entityId,
                                                              boolean outgoing)
                                                       throws Exception
Throws:
Exception

getRelatedEdges

protected List<EntityWriter> getRelatedEdges(boolean outgoing)

generateEntityQuery

protected org.apache.lucene.search.Query generateEntityQuery(EntityId entityId)

getKeyColumns

public IFFColumnModel<?>[] getKeyColumns()

parseEntityId

public EntityId parseEntityId(String searchString)


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.