com.google.enterprise.adaptor
Class DocIdPusher.Record.Builder

java.lang.Object
  extended by com.google.enterprise.adaptor.DocIdPusher.Record.Builder
Enclosing class:
DocIdPusher.Record

public static class DocIdPusher.Record.Builder
extends Object

Builder to create instances of Record.


Constructor Summary
DocIdPusher.Record.Builder(DocId id)
          Create mutable builder for building DocIdPusher.Record instances.
DocIdPusher.Record.Builder(DocIdPusher.Record startPoint)
          Create mutable builder initialized to values provided by startPoint.
 
Method Summary
 DocIdPusher.Record build()
          Creates single instance of Record.
 DocIdPusher.Record.Builder setCrawlImmediately(boolean crawlImmediately)
          Inform the GSA that the document has been modified, and that the GSA should give high priority to recrawling the document.
 DocIdPusher.Record.Builder setCrawlOnce(boolean crawlOnce)
          Instruct the GSA to not recrawl the document after the initial retrieval.
 DocIdPusher.Record.Builder setDeleteFromIndex(boolean b)
          Set whether the GSA is being informed the document has been deleted.
 DocIdPusher.Record.Builder setDocId(DocId id)
          Set the identifier for the document this record is providing information for.
 DocIdPusher.Record.Builder setLastModified(Date lastModified)
          Provides the last-modified date of the document.
 DocIdPusher.Record.Builder setLock(boolean lock)
          Instruct the GSA to "lock" the document into its index.
 DocIdPusher.Record.Builder setResultLink(URI link)
          Set the URI to be displayed to the user in search results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocIdPusher.Record.Builder

public DocIdPusher.Record.Builder(DocId id)
Create mutable builder for building DocIdPusher.Record instances.

Parameters:
id - non-null identifier for the document being described

DocIdPusher.Record.Builder

public DocIdPusher.Record.Builder(DocIdPusher.Record startPoint)
Create mutable builder initialized to values provided by startPoint. This is useful for making changes to an existing Record.

Method Detail

setDocId

public DocIdPusher.Record.Builder setDocId(DocId id)
Set the identifier for the document this record is providing information for. This replaces the value provided to the constructor.

Parameters:
id - non-null identifier for the document
Returns:
the same instance of the builder, for chaining calls

setDeleteFromIndex

public DocIdPusher.Record.Builder setDeleteFromIndex(boolean b)
Set whether the GSA is being informed the document has been deleted. When false, the GSA is being informed the document exists. The default is false.

Returns:
the same instance of the builder, for chaining calls

setLastModified

public DocIdPusher.Record.Builder setLastModified(Date lastModified)
Provides the last-modified date of the document. This is used by the GSA to learn that the document has been modified since the GSA last retrieved the document's contents. When null, the GSA must use its natural crawling of content to discover changes. The default is null.

Returns:
the same instance of the builder, for chaining calls

setResultLink

public DocIdPusher.Record.Builder setResultLink(URI link)
Set the URI to be displayed to the user in search results. If null, then the crawl URI representing the DocId is used. The default is null.

Returns:
the same instance of the builder, for chaining calls

setCrawlImmediately

public DocIdPusher.Record.Builder setCrawlImmediately(boolean crawlImmediately)
Inform the GSA that the document has been modified, and that the GSA should give high priority to recrawling the document. The default is false.

Returns:
the same instance of the builder, for chaining calls

setCrawlOnce

public DocIdPusher.Record.Builder setCrawlOnce(boolean crawlOnce)
Instruct the GSA to not recrawl the document after the initial retrieval. The default is false.

Returns:
the same instance of the builder, for chaining calls

setLock

public DocIdPusher.Record.Builder setLock(boolean lock)
Instruct the GSA to "lock" the document into its index. This causes other documents to be evicted from the index when the document license limit is reached. The default is false.

Returns:
the same instance of the builder, for chaining calls

build

public DocIdPusher.Record build()
Creates single instance of Record. Does not reset builder.