public class DocId extends Object implements Comparable<DocId>
String that adds meaning to the String and prevents the string from being
confused with others that do not refer to documents.
You provide a DocId to methods like DocIdPusher.pushDocIds(java.lang.Iterable<com.google.enterprise.adaptor.DocId>)
to inform the GSA about the document's existance, so that it can crawl and
index it. When the GSA requests that document's contents, Request.getDocId() will have the same unique id as DocId you provided.
However, just because a DocId is provided, does not mean the value it
represents exists or ever existed. The GSA can query for documents that have
been deleted and users can query for documents that never existed.
| Constructor and Description |
|---|
DocId(String id)
Construct an identifier based on
id. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DocId docId)
Provides comparison for ids based on the unique id string.
|
boolean |
equals(Object o)
Determines equality based on the unique id string.
|
String |
getUniqueId()
Returns the string identifier provided to the constructor.
|
int |
hashCode()
Generates a hash code based on the unique id string.
|
String |
toString()
Generates a string useful for debugging that contains the unique id.
|
public DocId(String id)
id.id - non-null document identifierpublic String getUniqueId()
public String toString()
public boolean equals(Object o)
public int hashCode()
public int compareTo(DocId docId)
compareTo in interface Comparable<DocId>