public interface PrefixHandler
Modifier and Type | Interface and Description |
---|---|
static class |
PrefixHandler.ErrorBehaviour
What to do when the prefix handler cannot work
|
static class |
PrefixHandler.NoHooks |
static class |
PrefixHandler.Phase
Processing phase for the prefix
|
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.
|
void onInit(PrefixHandlerContext prefixHandlerContext) throws java.lang.Exception
java.lang.Exception
void onDeinit() throws java.lang.Exception
java.lang.Exception
void onQuery(QueryContext context) throws QueryProcessingException
QueryProcessingException
Node handlePrefix(PrefixHandler.Phase phase, PrefixNode node, NodeVisitor parentVisitor, QueryContext queryContext) throws QueryProcessingException
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
void setErrorBehaviour(PrefixHandler.ErrorBehaviour behaviour)
Copyright © 2013 Dassault Systèmes, All Rights Reserved.