org.apache.lucene.facet.index
Class FacetsPayloadProcessorProvider.FacetsPayloadProcessor

java.lang.Object
  extended by org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
      extended by org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor
Enclosing class:
FacetsPayloadProcessorProvider

public static class FacetsPayloadProcessorProvider.FacetsPayloadProcessor
extends PayloadProcessorProvider.PayloadProcessor

A PayloadProcessor for updating facets ordinal references, based on an ordinal map


Constructor Summary
protected FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams params, int[] ordinalMap)
           
 
Method Summary
 int payloadLength()
          Returns the length of the payload that was returned by PayloadProcessorProvider.PayloadProcessor.processPayload(byte[], int, int).
 byte[] processPayload(byte[] payload, int start, int length)
          Process the incoming payload and returns the resulting byte[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetsPayloadProcessorProvider.FacetsPayloadProcessor

protected FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams params,
                                                                int[] ordinalMap)
Parameters:
params - defines the encoding of facet ordinals as payload
ordinalMap - an array mapping previous facets ordinals to new ones
Method Detail

payloadLength

public int payloadLength()
                  throws IOException
Description copied from class: PayloadProcessorProvider.PayloadProcessor
Returns the length of the payload that was returned by PayloadProcessorProvider.PayloadProcessor.processPayload(byte[], int, int).

Specified by:
payloadLength in class PayloadProcessorProvider.PayloadProcessor
Throws:
IOException

processPayload

public byte[] processPayload(byte[] payload,
                             int start,
                             int length)
                      throws IOException
Description copied from class: PayloadProcessorProvider.PayloadProcessor
Process the incoming payload and returns the resulting byte[]. Note that a new array might be allocated if the given array is not big enough. The length of the new payload data can be obtained via PayloadProcessorProvider.PayloadProcessor.payloadLength().

Specified by:
processPayload in class PayloadProcessorProvider.PayloadProcessor
Throws:
IOException