|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjgd.comapi.QueryResultItem
public class QueryResultItem
Class for representing one single search-result -entry within a set of results returned by a GD query
QueryResultSet| Field Summary | |
|---|---|
private java.text.SimpleDateFormat |
dateformat
|
private int |
itemNumber
|
private static int |
MAX_SNIPPET_LENGTH
|
private java.util.Map<java.lang.String,java.lang.String> |
properties
|
private java.lang.String |
queryString
|
private java.lang.String |
schema
|
private java.lang.String |
snippet
|
| Constructor Summary | |
|---|---|
QueryResultItem(java.lang.String queryString)
|
|
| Method Summary | |
|---|---|
protected void |
calculateSnippet()
It seems that the current Native GD API does not support obtaining a summary/snippet of a search-result -entry (the documentation on http://desktop.google.com/queryapi.html#individualresult mentions a summary -property, but this property is not listed in the complete set of properties) |
java.lang.String |
getCacheUrl()
cache_url is the Google Desktop Search-relative URL of this result's internal cache page. |
java.lang.String |
getCategory()
contains the result's type, one of: email, chat, web, file, contact, calendar, task, journal, note. |
long |
getDocId()
doc_id is the result's GDS internal identifier for doc. |
long |
getEventId()
event_id is the result's GDS internal identifier for event. |
java.lang.String |
getFlags()
Undocumented by google (Only for Desktop2) |
int |
getFormat()
|
java.lang.String |
getFrom()
from is the name of either the person an email message was from, or the other party in a Instant Message chat. |
java.lang.String |
getIcon()
Deprecated. |
long |
getId()
id is the result's GDS internal identifier. |
int |
getItemNumber()
|
java.lang.String |
getMessageId()
Undocumented by google (Only for Desktop2) |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
See http://desktop.google.com/queryapi.html#individualresult |
java.lang.Object |
getProperty(java.lang.String name)
|
java.lang.String |
getSchema()
See http://desktop.google.com/queryapi.html#individualresult |
java.lang.String |
getSnippet()
snippet is a snippet from the result's content that contains at least one of the search terms. |
java.lang.String |
getTextContent()
|
java.lang.String |
getThumbnail()
thumbnail is a relative URL to the icon for this result at the GDS webserver |
java.math.BigInteger |
getTime()
time is the time value from the event that put this content into GDS. |
java.util.Date |
getTimestamp()
|
java.lang.String |
getTitle()
title is the result's title, which varies depending on its type: Web page: the page's title. |
java.lang.String |
getURI()
See http://desktop.google.com/queryapi.html#individualresult |
java.lang.String |
getUrl()
url is the result's URL. |
void |
setCacheUrl(java.lang.String value)
cache_url is the Google Desktop Search-relative URL of this result's internal cache page. |
void |
setCategory(java.lang.String value)
contains the result's type, one of: email, chat, web, file, contact, calendar, task, journal, note. |
void |
setDocId(long value)
doc_id is the result's GDS internal identifier for doc. |
void |
setEventId(long value)
event_id is the result's GDS internal identifier for event. |
void |
setFlags(java.lang.String value)
Undocumented by google (Only for Desktop2) |
void |
setFrom(java.lang.String value)
from is the name of either the person an email message was from, or the other party in a Instant Message chat. |
void |
setIcon(java.lang.String value)
icon is a Google Desktop Search-relative URL to an icon representing this result or its type. |
void |
setId(long value)
id is the result's GDS internal identifier. |
void |
setItemNumber(int itemNumber)
Should only be used internally by the GDS Java API |
void |
setMessageId(java.lang.String value)
Undocumented by google (Only for Desktop2) |
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
See http://desktop.google.com/queryapi.html#individualresult |
void |
setSchema(java.lang.String schema)
See http://desktop.google.com/queryapi.html#individualresult |
void |
setSnippet(java.lang.String snippet)
snippet is a snippet from the result's content that contains at least one of the search terms. |
void |
setThumbnail(java.lang.String value)
thumbnail is a relative URL to the icon for this result at the GDS webserver |
void |
setTime(java.math.BigInteger value)
time is the time value from the event that put this content into GDS. |
void |
setTitle(java.lang.String value)
title is the result's title, which varies depending on its type: Web page: the page's title. |
void |
setUrl(java.lang.String value)
url is the result's URL. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final int MAX_SNIPPET_LENGTH
private java.lang.String schema
private int itemNumber
private java.lang.String snippet
private java.util.Map<java.lang.String,java.lang.String> properties
private java.text.SimpleDateFormat dateformat
private java.lang.String queryString
| Constructor Detail |
|---|
public QueryResultItem(java.lang.String queryString)
| Method Detail |
|---|
public int getItemNumber()
public void setItemNumber(int itemNumber)
getItemNumber()public java.lang.String getSchema()
getSchema in interface IJGDResultItempublic void setSchema(java.lang.String schema)
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
public java.lang.String getURI()
protected void calculateSnippet()
textContentVariant - The text_content -property as a VariantqueryString - the query-string used which resulted in a QueryResultItem
having the given text_contentpublic void setSnippet(java.lang.String snippet)
ResultsType.ResultType
setSnippet in interface ResultsType.ResultTypesnippet - allowed object is
Stringjgd.comapi.QueryCOM#getSnippet(Variant, QueryString)public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getCacheUrl()
ResultsType.ResultType
getCacheUrl in interface ResultsType.ResultTypeStringpublic java.lang.String getCategory()
ResultsType.ResultType
getCategory in interface ResultsType.ResultTypeStringpublic long getDocId()
ResultsType.ResultType
getDocId in interface ResultsType.ResultTypepublic long getEventId()
ResultsType.ResultType
getEventId in interface ResultsType.ResultTypepublic java.lang.String getFlags()
ResultsType.ResultType
getFlags in interface ResultsType.ResultTypeStringpublic java.lang.String getFrom()
ResultsType.ResultType
getFrom in interface ResultsType.ResultTypeStringpublic java.lang.String getIcon()
ResultsType.ResultType
getIcon in interface ResultsType.ResultTypeStringpublic long getId()
ResultsType.ResultType
getId in interface ResultsType.ResultTypepublic java.lang.String getMessageId()
ResultsType.ResultType
getMessageId in interface ResultsType.ResultTypeStringpublic java.lang.String getThumbnail()
ResultsType.ResultType
getThumbnail in interface ResultsType.ResultTypeStringpublic java.math.BigInteger getTime()
ResultsType.ResultType
getTime in interface ResultsType.ResultTypeBigIntegerpublic java.lang.Object getProperty(java.lang.String name)
public java.lang.String getTitle()
ResultsType.ResultType
getTitle in interface ResultsType.ResultTypeStringpublic java.lang.String getUrl()
ResultsType.ResultType
getUrl in interface ResultsType.ResultTypeStringpublic void setCacheUrl(java.lang.String value)
ResultsType.ResultType
setCacheUrl in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setCategory(java.lang.String value)
ResultsType.ResultType
setCategory in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setDocId(long value)
ResultsType.ResultType
setDocId in interface ResultsType.ResultTypepublic void setEventId(long value)
ResultsType.ResultType
setEventId in interface ResultsType.ResultTypepublic void setFlags(java.lang.String value)
ResultsType.ResultType
setFlags in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setFrom(java.lang.String value)
ResultsType.ResultType
setFrom in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setIcon(java.lang.String value)
ResultsType.ResultType
setIcon in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setId(long value)
ResultsType.ResultType
setId in interface ResultsType.ResultTypepublic void setMessageId(java.lang.String value)
ResultsType.ResultType
setMessageId in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setThumbnail(java.lang.String value)
ResultsType.ResultType
setThumbnail in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setTime(java.math.BigInteger value)
ResultsType.ResultType
setTime in interface ResultsType.ResultTypevalue - allowed object is
BigIntegerpublic void setTitle(java.lang.String value)
ResultsType.ResultType
setTitle in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic void setUrl(java.lang.String value)
ResultsType.ResultType
setUrl in interface ResultsType.ResultTypevalue - allowed object is
Stringpublic java.util.Date getTimestamp()
getTimestamp in interface IJGDResultItempublic int getFormat()
public java.lang.String getTextContent()
public java.lang.String getSnippet()
ResultsType.ResultType
getSnippet in interface ResultsType.ResultTypeString
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||