org.carrot2.source.microsoft
Class Bing2DocumentSourceDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.source.SearchEngineBaseDescriptor.AttributeBuilder
      extended by org.carrot2.source.MultipageSearchEngineDescriptor.AttributeBuilder
          extended by org.carrot2.source.microsoft.Bing2DocumentSourceDescriptor.AttributeBuilder
Direct Known Subclasses:
Bing2ImageDocumentSourceDescriptor.AttributeBuilder, Bing2NewsDocumentSourceDescriptor.AttributeBuilder, Bing2WebDocumentSourceDescriptor.AttributeBuilder
Enclosing class:
Bing2DocumentSourceDescriptor

public static class Bing2DocumentSourceDescriptor.AttributeBuilder
extends MultipageSearchEngineDescriptor.AttributeBuilder

Attribute map builder for the Bing2DocumentSource component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected Bing2DocumentSourceDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 Bing2DocumentSourceDescriptor.AttributeBuilder adult(AdultOption value)
          Adult search restriction (porn filter).
 Bing2DocumentSourceDescriptor.AttributeBuilder adult(Class<? extends AdultOption> clazz)
          Adult search restriction (porn filter).
 Bing2DocumentSourceDescriptor.AttributeBuilder appid(String value)
          Microsoft-assigned application ID for querying the API.
 Bing2DocumentSourceDescriptor.AttributeBuilder market(Class<? extends MarketOption> clazz)
          Language and country/region information for the request.
 Bing2DocumentSourceDescriptor.AttributeBuilder market(MarketOption value)
          Language and country/region information for the request.
 Bing2DocumentSourceDescriptor.AttributeBuilder options(String value)
          Miscellaneous request options.
 
Methods inherited from class org.carrot2.source.MultipageSearchEngineDescriptor.AttributeBuilder
searchMode, searchMode
 
Methods inherited from class org.carrot2.source.SearchEngineBaseDescriptor.AttributeBuilder
compressed, documents, query, results, resultsTotal, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

Bing2DocumentSourceDescriptor.AttributeBuilder

protected Bing2DocumentSourceDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

appid

public Bing2DocumentSourceDescriptor.AttributeBuilder appid(String value)
Microsoft-assigned application ID for querying the API. Please generate your own ID for production deployments and branches off the Carrot2.org's code.

See Also:
Bing2DocumentSource.appid

market

public Bing2DocumentSourceDescriptor.AttributeBuilder market(MarketOption value)
Language and country/region information for the request.

See Also:
Bing2DocumentSource.market

market

public Bing2DocumentSourceDescriptor.AttributeBuilder market(Class<? extends MarketOption> clazz)
Language and country/region information for the request.

See Also:
Bing2DocumentSource.market

adult

public Bing2DocumentSourceDescriptor.AttributeBuilder adult(AdultOption value)
Adult search restriction (porn filter).

See Also:
Bing2DocumentSource.adult

adult

public Bing2DocumentSourceDescriptor.AttributeBuilder adult(Class<? extends AdultOption> clazz)
Adult search restriction (porn filter).

See Also:
Bing2DocumentSource.adult

options

public Bing2DocumentSourceDescriptor.AttributeBuilder options(String value)
Miscellaneous request options. Bing provides the following options:

Options should be space-separated.

See Also:
Bing2DocumentSource.options


Copyright (c) Dawid Weiss, Stanislaw Osinski