com.dionloy.joogle
Class JGResult

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

public class JGResult
extends java.lang.Object

JGResult represents an individual search result link from Google.

Version: $Version$


Constructor Summary
JGResult()
          Constructs a new JGResult instance.
 
Method Summary
 java.lang.String getDescription()
          Returns the description of the document found.
 int getIndex()
          Returns the index of this result (1-based).
 int getLevel()
          Returns the level of this result (1-based).
 java.lang.String getRank()
          Returns the rank of the document found.
 java.lang.String getTitle()
          Returns the title of the document found.
 java.lang.String getURL()
          Returns the URL where the document can be found.
 void parse(org.w3c.dom.Node node)
          Parses the node given and validates it.
protected  void parseAttributes(org.w3c.dom.Node node)
          Parses the attributes of the result node.
protected  void parseChild(org.w3c.dom.Node node)
          Parses the child node of the result node.
 java.lang.String toString()
          Outputs the variables to a String.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JGResult

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

getIndex

public int getIndex()
Returns the index of this result (1-based). -1 if the index was not found in the XML.

getLevel

public int getLevel()
Returns the level of this result (1-based). -1 if the level was not found in the XML.

getURL

public java.lang.String getURL()
Returns the URL where the document can be found.

getTitle

public java.lang.String getTitle()
Returns the title of the document found.

getRank

public java.lang.String getRank()
Returns the rank of the document found.

getDescription

public java.lang.String getDescription()
Returns the description of the document found.

parse

public void parse(org.w3c.dom.Node node)
Parses the node given and validates it.
Returns:
true if successful.

toString

public java.lang.String toString()
Outputs the variables to a String.
Overrides:
toString in class java.lang.Object

parseAttributes

protected void parseAttributes(org.w3c.dom.Node node)
Parses the attributes of the result node.

parseChild

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