org.carrot2.source.etools
Class EToolsDocumentSourceDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.source.SearchEngineBaseDescriptor.AttributeBuilder
      extended by org.carrot2.source.SimpleSearchEngineDescriptor.AttributeBuilder
          extended by org.carrot2.source.xml.RemoteXmlSimpleSearchEngineBaseDescriptor.AttributeBuilder
              extended by org.carrot2.source.etools.EToolsDocumentSourceDescriptor.AttributeBuilder
Enclosing class:
EToolsDocumentSourceDescriptor

public static class EToolsDocumentSourceDescriptor.AttributeBuilder
extends RemoteXmlSimpleSearchEngineBaseDescriptor.AttributeBuilder

Attribute map builder for the EToolsDocumentSource 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 EToolsDocumentSourceDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 EToolsDocumentSourceDescriptor.AttributeBuilder country(Class<? extends EToolsDocumentSource.Country> clazz)
          Determines the country of origin for the returned search results.
 EToolsDocumentSourceDescriptor.AttributeBuilder country(EToolsDocumentSource.Country value)
          Determines the country of origin for the returned search results.
 EToolsDocumentSourceDescriptor.AttributeBuilder dataSources(Class<? extends EToolsDocumentSource.DataSources> clazz)
          Determines which data sources to search.
 EToolsDocumentSourceDescriptor.AttributeBuilder dataSources(EToolsDocumentSource.DataSources value)
          Determines which data sources to search.
 EToolsDocumentSourceDescriptor.AttributeBuilder language(Class<? extends EToolsDocumentSource.Language> clazz)
          Determines the language of the returned search results.
 EToolsDocumentSourceDescriptor.AttributeBuilder language(EToolsDocumentSource.Language value)
          Determines the language of the returned search results.
 EToolsDocumentSourceDescriptor.AttributeBuilder partnerId(String value)
          eTools partner identifier.
 EToolsDocumentSourceDescriptor.AttributeBuilder safeSearch(boolean value)
          If enabled, excludes offensive content from the results.
 EToolsDocumentSourceDescriptor.AttributeBuilder serviceUrlBase(String value)
          Base URL for the eTools service
 EToolsDocumentSourceDescriptor.AttributeBuilder timeout(int value)
          Maximum time in milliseconds to wait for all data sources to return results.
 
Methods inherited from class org.carrot2.source.xml.RemoteXmlSimpleSearchEngineBaseDescriptor.AttributeBuilder
xmlDocumentSourceHelper
 
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

EToolsDocumentSourceDescriptor.AttributeBuilder

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

Method Detail

serviceUrlBase

public EToolsDocumentSourceDescriptor.AttributeBuilder serviceUrlBase(String value)
Base URL for the eTools service

See Also:
EToolsDocumentSource.serviceUrlBase

country

public EToolsDocumentSourceDescriptor.AttributeBuilder country(EToolsDocumentSource.Country value)
Determines the country of origin for the returned search results.

See Also:
EToolsDocumentSource.country

country

public EToolsDocumentSourceDescriptor.AttributeBuilder country(Class<? extends EToolsDocumentSource.Country> clazz)
Determines the country of origin for the returned search results.

See Also:
EToolsDocumentSource.country

language

public EToolsDocumentSourceDescriptor.AttributeBuilder language(EToolsDocumentSource.Language value)
Determines the language of the returned search results.

See Also:
EToolsDocumentSource.language

language

public EToolsDocumentSourceDescriptor.AttributeBuilder language(Class<? extends EToolsDocumentSource.Language> clazz)
Determines the language of the returned search results.

See Also:
EToolsDocumentSource.language

timeout

public EToolsDocumentSourceDescriptor.AttributeBuilder timeout(int value)
Maximum time in milliseconds to wait for all data sources to return results.

See Also:
EToolsDocumentSource.timeout

dataSources

public EToolsDocumentSourceDescriptor.AttributeBuilder dataSources(EToolsDocumentSource.DataSources value)
Determines which data sources to search.

See Also:
EToolsDocumentSource.dataSources

dataSources

public EToolsDocumentSourceDescriptor.AttributeBuilder dataSources(Class<? extends EToolsDocumentSource.DataSources> clazz)
Determines which data sources to search.

See Also:
EToolsDocumentSource.dataSources

safeSearch

public EToolsDocumentSourceDescriptor.AttributeBuilder safeSearch(boolean value)
If enabled, excludes offensive content from the results.

See Also:
EToolsDocumentSource.safeSearch

partnerId

public EToolsDocumentSourceDescriptor.AttributeBuilder partnerId(String value)
eTools partner identifier. If you have commercial arrangements with eTools, specify your partner id here.

See Also:
EToolsDocumentSource.partnerId


Copyright (c) Dawid Weiss, Stanislaw Osinski