|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object googlesearch.SearchResultPage
public class SearchResultPage
Represents one of many pages returned by a Google search. It is essentially just an adapter for a GoogleSearchResultElement object, providing a more convenient interface.
Field Summary | |
---|---|
static SearchResultPage |
NULL_PAGE
Represents an empty page. |
Constructor Summary | |
---|---|
SearchResultPage(com.google.soap.search.GoogleSearchResultElement adapted)
Create an object representing a single result page from a search. |
Method Summary | |
---|---|
void |
displayPage()
|
java.lang.String |
getCachedPage()
|
java.lang.Object |
getContent()
Get the contents of the url of this page. |
java.lang.String |
getContentType()
Retrieve the Mime type of the page. |
java.lang.String |
getHTML()
Get the html or text of a page with Mime type "text/html" or "text/plain". |
java.lang.String |
getSnippet()
Return a small part of the page as a string |
java.net.URL |
getURL()
Obtain a URL object for this page |
java.lang.String |
getURLString()
Retrieve the full URL string including protocol.This string can be pasted into a browser to retrieve the page. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SearchResultPage NULL_PAGE
Constructor Detail |
---|
public SearchResultPage(com.google.soap.search.GoogleSearchResultElement adapted)
adapted
- the Google API equivalent objectMethod Detail |
---|
public java.net.URL getURL() throws java.lang.RuntimeException
java.lang.RuntimeException
public java.lang.String getURLString()
public void displayPage()
public java.lang.String getHTML()
public java.lang.String getCachedPage()
public java.lang.String getSnippet()
public java.lang.Object getContent() throws java.io.IOException
java.io.IOException
public java.lang.String getContentType()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |