|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.LocalComponentBase
org.carrot2.core.LocalInputComponentBase
org.carrot2.input.alexa.AlexaInputComponent
public final class AlexaInputComponent
An input component for Alexa Search. This component was donated to the Carrot2 project by deepVertical.
| Field Summary | |
|---|---|
static int |
MAXIMUM_RESULTS
Maximum number of results (starting offset + length). |
static int |
MAXIMUM_RESULTS_PERQUERY
Maximum allowed results per query. |
static String |
PROPERTY_DISABLE_PARALLEL_MODE
If any value is set in the request context under this key, full parallel mode is disabled. |
| Fields inherited from class org.carrot2.core.LocalInputComponentBase |
|---|
next |
| Fields inherited from interface org.carrot2.core.clustering.RawDocumentsProducer |
|---|
PARAM_ORIGINAL_RAW_CLUSTERS, PROPERTY_CATID |
| Fields inherited from interface org.carrot2.core.LocalInputComponent |
|---|
PARAM_QUERY, PARAM_REQUESTED_RESULTS, PARAM_START_AT, PARAM_TOTAL_MATCHING_DOCUMENTS |
| Constructor Summary | |
|---|---|
AlexaInputComponent(String accessKey,
String secretKey)
Create an input component with the default service descriptor and a custom application identifier. |
|
| Method Summary | |
|---|---|
Set |
getComponentCapabilities()
Provides an implementation that has no capabilities (an empty set). |
String |
getName()
The default implementation returning null. |
Set |
getRequiredSuccessorCapabilities()
Provides an implementation that requires no capabilities of the successor component. |
void |
setNext(LocalComponent next)
The default implementation sets the LocalInputComponentBase.next field and verifies the
contract in LocalFilterComponent.setNext(LocalComponent) |
void |
setParallelMode(boolean value)
Enables or disables full parallel mode of search results fetching. |
void |
setQuery(String query)
Sets the query for the current request. |
void |
startProcessing(RequestContext requestContext)
The default implementation invokes protected LocalInputComponentBase.validate() method
first to verify preconditions. |
| Methods inherited from class org.carrot2.core.LocalInputComponentBase |
|---|
endProcessing, flushResources, getRequestedResults, processingErrorOccurred, validate |
| Methods inherited from class org.carrot2.core.LocalComponentBase |
|---|
getDescription, getIntFromRequestContext, 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, getRequiredPredecessorCapabilities, init, setProperty |
| Field Detail |
|---|
public static final String PROPERTY_DISABLE_PARALLEL_MODE
ParallelFetcher.setParallelMode(boolean),
Constant Field Valuespublic static final int MAXIMUM_RESULTS_PERQUERY
public static final int MAXIMUM_RESULTS
| Constructor Detail |
|---|
public AlexaInputComponent(String accessKey,
String secretKey)
| Method Detail |
|---|
public void setQuery(String query)
LocalInputComponent
setQuery in interface LocalInputComponentquery - A String with the query.public Set getComponentCapabilities()
LocalComponentBase
getComponentCapabilities in interface LocalComponentgetComponentCapabilities in class LocalComponentBaseSetobject with capabilities. The object
returned may be empty, but should never be null.public Set getRequiredSuccessorCapabilities()
LocalComponentBase
getRequiredSuccessorCapabilities in interface LocalComponentgetRequiredSuccessorCapabilities in class LocalComponentBaseSetobject with capabilities. The object
returned may be empty, but should never be null.public void setNext(LocalComponent next)
LocalInputComponentBaseLocalInputComponentBase.next field and verifies the
contract in LocalFilterComponent.setNext(LocalComponent)
setNext in interface LocalInputComponentsetNext in class LocalInputComponentBasenext - A reference to an instance of LocalComponent that is
the successor component in a processing chain assembled for the
execution of a single query.
public void startProcessing(RequestContext requestContext)
throws ProcessingException
LocalInputComponentBaseLocalInputComponentBase.validate() method
first to verify preconditions. Then it invokes
startProcessing(requestContext) method on the successor
component.
startProcessing in interface LocalComponentstartProcessing in class LocalInputComponentBaserequestContext - A RequestContextinterface instance passed
by the container processing the query. The context may be used
to retrieve parameters associated with the query (see RequestContext.getRequestParameters() method).
ProcessingException - Thrown if the component encountered a problem
in processing the query. May also be thrown from a chained
successor component.public String getName()
LocalComponentBasenull. In concrete
implementations override this method to provide the appropriate name.
getName in interface LocalComponentgetName in class LocalComponentBasenull namepublic void setParallelMode(boolean value)
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||