org.carrot2.source.microsoft
Class Bing2NewsDocumentSource

java.lang.Object
  extended by org.carrot2.core.ProcessingComponentBase
      extended by org.carrot2.source.SearchEngineBase
          extended by org.carrot2.source.MultipageSearchEngine
              extended by org.carrot2.source.microsoft.Bing2DocumentSource
                  extended by org.carrot2.source.microsoft.Bing2NewsDocumentSource
All Implemented Interfaces:
IDocumentSource, IProcessingComponent

public class Bing2NewsDocumentSource
extends Bing2DocumentSource

News search specific document source fetching from Bing using Bing2 API.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.carrot2.source.microsoft.Bing2DocumentSource
Bing2DocumentSource.BingResponse, Bing2DocumentSource.ImageResponse, Bing2DocumentSource.ImageResult, Bing2DocumentSource.NewsResponse, Bing2DocumentSource.NewsResult, Bing2DocumentSource.Thumbnail, Bing2DocumentSource.WebResponse, Bing2DocumentSource.WebResult
 
Nested classes/interfaces inherited from class org.carrot2.source.MultipageSearchEngine
MultipageSearchEngine.SearchEngineResponseCallable, MultipageSearchEngine.SearchMode, MultipageSearchEngine.SearchRange
 
Field Summary
 SortOrder sortOrder
          Specifies the sort order of results.
 
Fields inherited from class org.carrot2.source.microsoft.Bing2DocumentSource
adult, appid, CARROTSEARCH_APPID, market, MAX_CONCURRENT_THREADS, options
 
Fields inherited from class org.carrot2.source.MultipageSearchEngine
searchMode
 
Fields inherited from class org.carrot2.source.SearchEngineBase
compressed, documents, query, results, resultsTotal, start, statistics
 
Constructor Summary
Bing2NewsDocumentSource()
          Initialize source type properly.
 
Method Summary
protected  void appendSourceParams(ArrayList<org.apache.http.NameValuePair> params)
          Append any source-specific parameters.
 void process()
          Process the query.
 
Methods inherited from class org.carrot2.source.microsoft.Bing2DocumentSource
addIfNotEmpty, createFetcher
 
Methods inherited from class org.carrot2.source.MultipageSearchEngine
collectDocuments, process, runQuery
 
Methods inherited from class org.carrot2.source.SearchEngineBase
afterFetch, clean, urlEncode
 
Methods inherited from class org.carrot2.core.ProcessingComponentBase
afterProcessing, beforeProcessing, dispose, getContext, getSharedExecutor, init
 
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.IProcessingComponent
afterProcessing, beforeProcessing, dispose, init
 

Field Detail

sortOrder

public SortOrder sortOrder
Specifies the sort order of results.

Attribute label:
Sort order
Attribute level:
Medium
Attribute group:
Results filtering
Constructor Detail

Bing2NewsDocumentSource

public Bing2NewsDocumentSource()
Initialize source type properly.

Method Detail

process

public void process()
             throws ProcessingException
Process the query.

Specified by:
process in interface IProcessingComponent
Specified by:
process in class Bing2DocumentSource
Throws:
ProcessingException - when processing failed. If thrown, the IProcessingComponent.afterProcessing() method will be called and the component will be ready to accept further requests or to be disposed of. Finally, the exception will be rethrown from the controller method that caused the component to perform processing.

appendSourceParams

protected void appendSourceParams(ArrayList<org.apache.http.NameValuePair> params)
Description copied from class: Bing2DocumentSource
Append any source-specific parameters.

Overrides:
appendSourceParams in class Bing2DocumentSource


Copyright (c) Dawid Weiss, Stanislaw Osinski