public class GeoPrefix extends NodeVisitor implements PrefixHandler
PrefixHandler.ErrorBehaviour, PrefixHandler.NoHooks, PrefixHandler.Phase
Constructor and Description |
---|
GeoPrefix(java.lang.String targetIndexField) |
Modifier and Type | Method and Description |
---|---|
Node |
handlePrefix(PrefixHandler.Phase phase,
PrefixNode node,
NodeVisitor parentVisitor,
QueryContext queryContext)
Handle a given prefix node.
|
void |
onDeinit()
Called when this instance of the prefix handler is deinitialized.
|
void |
onInit(PrefixHandlerContext prefixHandlerContext)
Called when this instance of the prefix handler is initialized.
|
void |
onQuery(QueryContext context)
Called when a query is about to be processed.
|
void |
setErrorBehaviour(PrefixHandler.ErrorBehaviour behaviour)
Choose the error behaviour of the prefix handler.
|
Node |
visit(Distance node) |
Node |
visit(Within node) |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitNary, visitUnary
public Node handlePrefix(PrefixHandler.Phase phase, PrefixNode node, NodeVisitor parentVisitor, QueryContext queryContext) throws QueryProcessingException
PrefixHandler
handlePrefix
in interface PrefixHandler
phase
- the "Phase" of the prefix handler, indicating how far in
the pipeline we are.In the standard chain, 4 phases are defined:
PRE_LINGUISTIC, PRE_TRANSFORM, PRE_MAP, POST_MAPnode
- The prefix node to handleparentVisitor
- If your handler is not "terminal", ie, if it
supports nesting, it should call this visitor to visit the prefix
node's content, additionally to performing its work. Warning: this
can be null, in that case, you must not delegate.queryContext
- access to overridable query-related parametersQueryProcessingException
public Node visit(Within node) throws QueryProcessingException
visit
in class NodeVisitor
QueryProcessingException
public Node visit(Distance node) throws QueryProcessingException
visit
in class NodeVisitor
QueryProcessingException
public void setErrorBehaviour(PrefixHandler.ErrorBehaviour behaviour)
PrefixHandler
setErrorBehaviour
in interface PrefixHandler
public void onInit(PrefixHandlerContext prefixHandlerContext) throws java.lang.Exception
PrefixHandler
onInit
in interface PrefixHandler
java.lang.Exception
public void onDeinit() throws java.lang.Exception
PrefixHandler
onDeinit
in interface PrefixHandler
java.lang.Exception
public void onQuery(QueryContext context) throws QueryProcessingException
PrefixHandler
onQuery
in interface PrefixHandler
QueryProcessingException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.