org.exist.indexing
Interface MatchListener

All Superinterfaces:
Receiver
All Known Implementing Classes:
AbstractMatchListener, FTMatchListener

public interface MatchListener
extends Receiver

Highlight matches in query results. Indexes can implement this interface to filter the output produced by the serializer when serializing query results. See IndexWorker.getMatchListener(org.exist.storage.DBBroker, org.exist.dom.NodeProxy). The interface basically extends Receiver. The additional methods are used to chain multiple MatchListeners. Implementations should forward all events to the next receiver in the chain (if there is one). Class AbstractMatchListener provides default implementations for all methods.


Field Summary
 
Fields inherited from interface org.exist.util.serializer.Receiver
MATCH_ELEMENT
 
Method Summary
 Receiver getLastInChain()
          Walks the chain and returns the final receiver.
 Receiver getNextInChain()
          Returns the next receiver in the chain.
 void setNextInChain(Receiver next)
          Register the next receiver in the chain.
 
Methods inherited from interface org.exist.util.serializer.Receiver
attribute, cdataSection, characters, comment, documentType, endDocument, endElement, endPrefixMapping, getDocument, highlightText, processingInstruction, setCurrentNode, startDocument, startElement, startPrefixMapping
 

Method Detail

setNextInChain

void setNextInChain(Receiver next)
Register the next receiver in the chain. All events should be forwarded to this.

Parameters:
next - the next receiver in the chain.

getNextInChain

Receiver getNextInChain()
Returns the next receiver in the chain.

Returns:
the next receiver

getLastInChain

Receiver getLastInChain()
Walks the chain and returns the final receiver.

Returns:
the last receiver in the chain


Copyright (C) Wolfgang Meier. All rights reserved.