|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.handler.dataimport.EntityProcessor
org.apache.solr.handler.dataimport.EntityProcessorWrapper
public class EntityProcessorWrapper
A Wrapper over EntityProcessor instance which performs transforms and handles multi-row outputs correctly.
| Field Summary | |
|---|---|
protected VariableResolverImpl |
resolver
|
protected List<Map<String,Object>> |
rowcache
|
protected List<Transformer> |
transformers
|
| Constructor Summary | |
|---|---|
EntityProcessorWrapper(EntityProcessor delegate,
DocBuilder docBuilder)
|
|
| Method Summary | |
|---|---|
protected Map<String,Object> |
applyTransformer(Map<String,Object> row)
handles null-on-null invocation call transformers via transformRow(java.util.Map, then assigns the result into row cache, and delegates to getFromRowCache() |
void |
close()
Invoked when the Entity processor is destroyed towards the end of import. |
void |
destroy()
Invoked for each entity at the very end of the import to do any needed cleanup tasks. |
Context |
getContext()
|
protected Map<String,Object> |
getFromRowCache()
|
VariableResolverImpl |
getVariableResolver()
|
void |
init(Context context)
This method is called when it starts processing an entity. |
Map<String,Object> |
nextDeletedRowKey()
This is used during delta-import. |
Map<String,Object> |
nextModifiedParentRowKey()
This is used during delta-import. |
Map<String,Object> |
nextModifiedRowKey()
This is used for delta-import. |
Map<String,Object> |
nextRow()
for root entity it retrieves single row, transforms it, and loop until transfomer passes the first row for child entities whole page is pulled. |
protected Map<String,Object> |
pullRow()
pulls single row from the delegate EntityProcessor. |
protected List<Map<String,Object>> |
transformRow(Map<String,Object> row)
Initialises transformers, applies them on the given row. |
| Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessor |
|---|
postTransform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected VariableResolverImpl resolver
protected List<Transformer> transformers
protected List<Map<String,Object>> rowcache
| Constructor Detail |
|---|
public EntityProcessorWrapper(EntityProcessor delegate,
DocBuilder docBuilder)
| Method Detail |
|---|
public void init(Context context)
EntityProcessor
init in class EntityProcessorcontext - The current contextprotected Map<String,Object> getFromRowCache()
protected Map<String,Object> applyTransformer(Map<String,Object> row)
transformRow(java.util.Map) , then assigns the result into row cache, and delegates to getFromRowCache()
protected List<Map<String,Object>> transformRow(Map<String,Object> row)
public Map<String,Object> nextRow()
nextRow in class EntityProcessorprotected Map<String,Object> pullRow()
public Map<String,Object> nextModifiedRowKey()
EntityProcessor
nextModifiedRowKey in class EntityProcessorpublic Map<String,Object> nextDeletedRowKey()
EntityProcessor
nextDeletedRowKey in class EntityProcessorpublic Map<String,Object> nextModifiedParentRowKey()
EntityProcessor
nextModifiedParentRowKey in class EntityProcessorpublic void destroy()
EntityProcessor
destroy in class EntityProcessorpublic VariableResolverImpl getVariableResolver()
public Context getContext()
public void close()
EntityProcessor
close in class EntityProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||