org.carrot2.source.google
Class GoogleDocumentSourceDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.source.SearchEngineBaseDescriptor.AttributeBuilder
      extended by org.carrot2.source.MultipageSearchEngineDescriptor.AttributeBuilder
          extended by org.carrot2.source.google.GoogleDocumentSourceDescriptor.AttributeBuilder
Enclosing class:
GoogleDocumentSourceDescriptor

public static class GoogleDocumentSourceDescriptor.AttributeBuilder
extends MultipageSearchEngineDescriptor.AttributeBuilder

Attribute map builder for the GoogleDocumentSource 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 GoogleDocumentSourceDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 GoogleDocumentSourceDescriptor.AttributeBuilder keepHighlights(boolean value)
          Keep query word highlighting.
 GoogleDocumentSourceDescriptor.AttributeBuilder referer(String value)
          Request referer.
 GoogleDocumentSourceDescriptor.AttributeBuilder serviceUrl(String value)
          Service URL.
 
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

GoogleDocumentSourceDescriptor.AttributeBuilder

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

Method Detail

serviceUrl

public GoogleDocumentSourceDescriptor.AttributeBuilder serviceUrl(String value)
Service URL. Google web search service URL.

See Also:
GoogleDocumentSource.serviceUrl

referer

public GoogleDocumentSourceDescriptor.AttributeBuilder referer(String value)
Request referer. Please do not use the default value when deploying this component in production environments. Instead, put the URL to your application here.

See Also:
GoogleDocumentSource.referer

keepHighlights

public GoogleDocumentSourceDescriptor.AttributeBuilder keepHighlights(boolean value)
Keep query word highlighting. Google by default highlights query words in snippets using the bold HTML tag. Set this attribute to true to keep these highlights.

See Also:
GoogleDocumentSource.keepHighlights


Copyright (c) Dawid Weiss, Stanislaw Osinski