|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUrlTreeNode
Class used to hold information about a web site that has been searched by the spider class
Constructor Summary | |
UrlTreeNode(java.lang.String atext)
Creates a new instance of UrlTreeNode |
|
UrlTreeNode(java.net.URL aurl)
Creates a new instance of UrlTreeNode |
Method Summary | |
void |
addChars(int n)
Increments character count |
void |
addImages(int n)
Increments image count |
void |
addLinks(int n)
Increments link count |
boolean |
equals(java.lang.String urlstr)
test for equality |
java.net.URL |
getBase()
returns base url |
java.lang.String |
getKeywords()
get the keywords found in this node |
java.lang.String |
getNodeStats()
retrieves character, link, and image count as a displayable string |
java.net.URL |
getUrl()
returns the url object for this node or null if it is a text node |
java.lang.String |
getUrlString()
retrieves the url as a string |
boolean |
isMatch()
return state of node |
void |
setBase(java.lang.String abase)
sets the base location for the node, called in response to finding a base tag in the web page |
void |
setMatch(java.lang.String keyword)
returns whether or not this node contains a match for the spiders search criteria |
void |
setTitle(java.lang.String atitle)
sets the title attribute of the node |
java.lang.String |
toString()
return url string for display on screen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UrlTreeNode(java.net.URL aurl)
aurl
- url of the web pagepublic UrlTreeNode(java.lang.String atext)
atext
- text for the nodeMethod Detail |
public java.lang.String toString()
public java.lang.String getKeywords()
public boolean isMatch()
public java.net.URL getUrl()
public void setMatch(java.lang.String keyword)
keyword
- keyword found in web site.public void setBase(java.lang.String abase)
abase
- base url to use for relative addressingpublic java.net.URL getBase()
public void setTitle(java.lang.String atitle)
atitle
- title of web page from public boolean equals(java.lang.String urlstr)
urlstr
- string containing url to compare
public void addChars(int n)
n
- number of characters to addpublic void addLinks(int n)
n
- number of linkss to addpublic void addImages(int n)
n
- number of images to addpublic java.lang.String getNodeStats()
public java.lang.String getUrlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |