public static class DocIdPusher.Record.Builder extends Object
Constructor and Description |
---|
Builder(DocId id)
Create mutable builder for building
DocIdPusher.Record instances. |
Builder(DocIdPusher.Record startPoint)
Create mutable builder initialized to values provided by
startPoint . |
Modifier and Type | Method and Description |
---|---|
DocIdPusher.Record.Builder |
addMetadata(String k,
String v)
Add a new name/value to the metadata for the document this record is
providing information for.
|
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 |
setMetadata(Metadata metadata)
Replace the metadata for the document this record is providing
information for.
|
DocIdPusher.Record.Builder |
setResultLink(URI link)
Set the URI to be displayed to the user in search results.
|
public Builder(DocId id)
DocIdPusher.Record
instances.id
- non-null
identifier for the document being describedpublic Builder(DocIdPusher.Record startPoint)
startPoint
. This is useful for making changes to an existing Record
.startPoint
- initial model for Builder to usepublic DocIdPusher.Record.Builder setDocId(DocId id)
id
- non-null
identifier for the documentpublic DocIdPusher.Record.Builder setDeleteFromIndex(boolean b)
false
, the GSA is being informed the document exists. The
default is false
.b
- indicates whether GSA should delete doc from indexpublic DocIdPusher.Record.Builder setLastModified(Date lastModified)
null
, the GSA must use
its natural crawling of content to discover changes. The default is
null
.lastModified
- date and time this document last changedpublic DocIdPusher.Record.Builder setResultLink(URI link)
null
, then the crawl URI representing the DocId
is used. The
default is null
.link
- to provide to user to click onpublic DocIdPusher.Record.Builder setCrawlImmediately(boolean crawlImmediately)
false
.crawlImmediately
- whether file is to be given crawl prioritypublic DocIdPusher.Record.Builder setCrawlOnce(boolean crawlOnce)
false
.crawlOnce
- whether file is to be crawled at most oncepublic DocIdPusher.Record.Builder setLock(boolean lock)
false
.lock
- whether file is to be locked on GSApublic DocIdPusher.Record.Builder setMetadata(Metadata metadata)
metadata
- Metadata for the documentpublic DocIdPusher.Record.Builder addMetadata(String k, String v)
k
- key for the new piece of Metadatav
- value for the new piece of MetadataNullPointerException
- if either k
or v
are null.public DocIdPusher.Record build()