com.dionloy.joogle
Class JGDocument

java.lang.Object
  |
  +--com.dionloy.joogle.JGDocument

public class JGDocument
extends java.lang.Object

JGDocument represents the data contained in the response from a Google search. This will include a listing of JGResult objects representing the individual links returned in the search.

Version: $Version$


Constructor Summary
JGDocument()
          Constructs a new JGDocument instance.
 
Method Summary
 int getEndIndex()
          Returns the end index (1-based) of this page of results.
 java.lang.String getNextURL()
          Returns the 'Next' URL, if one were to page through the results.
 java.lang.String getPreviousURL()
          Returns the 'Previous' URL, if one were to page through the results.
 java.lang.String getQuery()
          Returns the query string as seen by Google.
 java.util.Enumeration getSearchResults()
          Returns an Enumeration of the JGResult objects, representing the search result links in the order that they were given.
 int getStartIndex()
          Returns the start index (1-based) of this page of results.
 java.lang.String getTime()
          Returns the time it took to finish this query (on Google's side).
 java.lang.String getVersion()
          Returns the version of the XML document.
 void parse(org.w3c.dom.Node rootNode)
          Parses the DOM tree to fill up our instance variables.
protected  void parseNavigation(org.w3c.dom.Node node)
          Parses the navigation nodes (JGTags.Navigation).
protected  void parseNode(org.w3c.dom.Node node)
          Parses the node given and assign it to the correct variable.
protected  void parseResultList(org.w3c.dom.Node node)
          Parses the result list node.
protected  void parseResultListChild(org.w3c.dom.Node node)
          Parses the child node of the result list node.
 java.lang.String toString()
          Outputs ourselves to a human readable String.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JGDocument

public JGDocument()
Constructs a new JGDocument instance.
Method Detail

getVersion

public java.lang.String getVersion()
Returns the version of the XML document.

getTime

public java.lang.String getTime()
Returns the time it took to finish this query (on Google's side).

getQuery

public java.lang.String getQuery()
Returns the query string as seen by Google.

getStartIndex

public int getStartIndex()
Returns the start index (1-based) of this page of results.

getEndIndex

public int getEndIndex()
Returns the end index (1-based) of this page of results.

getNextURL

public java.lang.String getNextURL()
Returns the 'Next' URL, if one were to page through the results. This will be null if no other 'pages' exist.

getPreviousURL

public java.lang.String getPreviousURL()
Returns the 'Previous' URL, if one were to page through the results. This will be null if no other 'pages' exist.

getSearchResults

public java.util.Enumeration getSearchResults()
Returns an Enumeration of the JGResult objects, representing the search result links in the order that they were given.

parse

public void parse(org.w3c.dom.Node rootNode)
Parses the DOM tree to fill up our instance variables.

toString

public java.lang.String toString()
Outputs ourselves to a human readable String.
Overrides:
toString in class java.lang.Object

parseNode

protected void parseNode(org.w3c.dom.Node node)
Parses the node given and assign it to the correct variable.

parseResultList

protected void parseResultList(org.w3c.dom.Node node)
Parses the result list node.

parseResultListChild

protected void parseResultListChild(org.w3c.dom.Node node)
Parses the child node of the result list node.

parseNavigation

protected void parseNavigation(org.w3c.dom.Node node)
Parses the navigation nodes (JGTags.Navigation).