org.apache.nutch.clustering.carrot2
Class NutchInputComponent

java.lang.Object
  extended by org.carrot2.core.LocalComponentBase
      extended by org.carrot2.core.LocalInputComponentBase
          extended by org.apache.nutch.clustering.carrot2.NutchInputComponent
All Implemented Interfaces:
org.carrot2.core.LocalComponent, org.carrot2.core.LocalInputComponent

public class NutchInputComponent
extends org.carrot2.core.LocalInputComponentBase

An input component that ignores the query passed from the controller and instead looks for data stored in the request context. This enables us to reuse the same physical component implementation for data that has already been acquired from Nutch.


Field Summary
static String NUTCH_INPUT_HIT_DETAILS_ARRAY
           
static String NUTCH_INPUT_SUMMARIES_ARRAY
           
 
Fields inherited from class org.carrot2.core.LocalInputComponentBase
next
 
Fields inherited from interface org.carrot2.core.LocalInputComponent
PARAM_QUERY, PARAM_REQUESTED_RESULTS, PARAM_START_AT, PARAM_TOTAL_MATCHING_DOCUMENTS
 
Constructor Summary
NutchInputComponent(String defaultLanguage)
          Creates an input component with the given default language code.
 
Method Summary
 Set getComponentCapabilities()
          Returns the capabilities provided by this component.
 Set getRequiredSuccessorCapabilities()
          Returns the capabilities required from the successor component.
 void setQuery(String query)
           
 void startProcessing(org.carrot2.core.RequestContext context)
          A callback hook that starts the processing.
 
Methods inherited from class org.carrot2.core.LocalInputComponentBase
endProcessing, flushResources, getRequestedResults, processingErrorOccurred, setNext, validate
 
Methods inherited from class org.carrot2.core.LocalComponentBase
getDescription, getIntFromRequestContext, getName, getProperty, getRequiredPredecessorCapabilities, init, setProperty, toSet, toSet, toSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.carrot2.core.LocalComponent
getDescription, getName, getRequiredPredecessorCapabilities, init, setProperty
 

Field Detail

NUTCH_INPUT_HIT_DETAILS_ARRAY

public static final String NUTCH_INPUT_HIT_DETAILS_ARRAY
See Also:
Constant Field Values

NUTCH_INPUT_SUMMARIES_ARRAY

public static final String NUTCH_INPUT_SUMMARIES_ARRAY
See Also:
Constant Field Values
Constructor Detail

NutchInputComponent

public NutchInputComponent(String defaultLanguage)
Creates an input component with the given default language code.

Method Detail

setQuery

public void setQuery(String query)

startProcessing

public void startProcessing(org.carrot2.core.RequestContext context)
                     throws org.carrot2.core.ProcessingException
A callback hook that starts the processing.

Specified by:
startProcessing in interface org.carrot2.core.LocalComponent
Overrides:
startProcessing in class org.carrot2.core.LocalInputComponentBase
Throws:
org.carrot2.core.ProcessingException

getComponentCapabilities

public Set getComponentCapabilities()
Returns the capabilities provided by this component.

Specified by:
getComponentCapabilities in interface org.carrot2.core.LocalComponent
Overrides:
getComponentCapabilities in class org.carrot2.core.LocalComponentBase

getRequiredSuccessorCapabilities

public Set getRequiredSuccessorCapabilities()
Returns the capabilities required from the successor component.

Specified by:
getRequiredSuccessorCapabilities in interface org.carrot2.core.LocalComponent
Overrides:
getRequiredSuccessorCapabilities in class org.carrot2.core.LocalComponentBase


Copyright © 2006 The Apache Software Foundation