|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ir.webutils.HTMLPage
HTMLPage is a representation of information about a web page.
Field Summary | |
protected java.lang.String |
absoluteText
Copy of the text with relative links replaced by absolute ones |
protected Link |
link
The original link to this page |
protected java.util.List |
outLinks
The links on this page |
protected java.lang.String |
text
The text of the page |
Constructor Summary | |
HTMLPage(Link link,
java.lang.String text)
Constructs an HTMLPage with the given link and text. |
Method Summary | |
boolean |
empty()
Returns true if the page is empty or a 404 error. |
java.lang.String |
getAbsoluteText()
Get the absolute link version of this page |
Link |
getLink()
Returns the Link object that was used to access
this page. |
java.util.List |
getOutLinks()
Get the list of out links from this page. |
java.lang.String |
getText()
Returns the full text of this page. |
boolean |
indexAllowed()
Clients should always call this method before indexing an HTML page if they want to obey the "NOINDEX" directive in the Robots META tag. |
void |
setAbsoluteText(java.lang.String text)
Set the absolute link version of this page |
void |
setOutLinks(java.util.List links)
Set of the outLinks for this page to given list |
void |
writeAbsolute(java.io.File dir,
java.lang.String name)
Writes web page to a file with absolute links and a comment with the original URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Link link
protected final java.lang.String text
protected java.util.List outLinks
protected java.lang.String absoluteText
Constructor Detail |
public HTMLPage(Link link, java.lang.String text)
HTMLPage
with the given link and text.link
- Link
object to the given page.text
- The text of the page.Method Detail |
public java.lang.String getText()
public Link getLink()
Link
object that was used to access
this page.Link
object that was used to access
this page.public void setOutLinks(java.util.List links)
public java.util.List getOutLinks()
public void setAbsoluteText(java.lang.String text)
public java.lang.String getAbsoluteText()
public boolean indexAllowed()
true
in default implementation.true
iff. the page can be indexed. Always
returns true
in the default implementation.public boolean empty()
public void writeAbsolute(java.io.File dir, java.lang.String name)
dir
- The directory to store the file in.name
- The name of the file.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |