info.informatica.www
Class WebPage

java.lang.Object
  extended by info.informatica.doc.DocumentFile
      extended by info.informatica.doc.TextDocument
          extended by info.informatica.www.WebPage
All Implemented Interfaces:
info.informatica.doc.Document, Hypertext
Direct Known Subclasses:
HTMLDoc

public abstract class WebPage
extends info.informatica.doc.TextDocument
implements Hypertext

Abstract class that provides a TextDocument text document with the proper methods to be handled as a web page, like a base URL or a Reader-based content assignation.

Version:
1.01
Author:
amengual at informatica dot info

Constructor Summary
WebPage()
           
 
Method Summary
 URL getBase()
          Gets the BASE URL
abstract  String getHttpEquiv(String name)
          Get information overriding HTTP headers.
abstract  RobotInfo getRobotInfo()
          Get the Robot information.
 URL getURL()
          Gets the URL
 void setBase(URL base)
          Sets the BASE URL
 void setURL(URL url)
          Sets the URL.
 String urlToUri(String src)
          Transforms an absolute URL into a relative URI.
 
Methods inherited from class info.informatica.doc.TextDocument
getInputStream, getKeywords, getLanguage, getMetaInfo, load, load, load, setLanguage, toPureText, toString, write, write
 
Methods inherited from class info.informatica.doc.DocumentFile
getLastUpdateDate, getMediaType, getSize, getTitle, setDate, setSize, setTitle, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface info.informatica.www.Hypertext
getEmbeddedUrls, getLinkedUrls
 

Constructor Detail

WebPage

public WebPage()
Method Detail

setURL

public void setURL(URL url)
Sets the URL.

Specified by:
setURL in interface Hypertext
Parameters:
url - the URL

getURL

public URL getURL()
Gets the URL

Specified by:
getURL in interface Hypertext
Returns:
the URL

setBase

public void setBase(URL base)
Sets the BASE URL

Specified by:
setBase in interface Hypertext
Parameters:
base - the base URL

getBase

public URL getBase()
Gets the BASE URL

Specified by:
getBase in interface Hypertext
Returns:
the base URL

urlToUri

public String urlToUri(String src)
Transforms an absolute URL into a relative URI.

Parameters:
src - the URL to be converted to relative
Returns:
the relative URL

getHttpEquiv

public abstract String getHttpEquiv(String name)
Get information overriding HTTP headers.

Parameters:
name - the name of the HTTP header
Returns:
the information to override header

getRobotInfo

public abstract RobotInfo getRobotInfo()
Get the Robot information.

Specified by:
getRobotInfo in interface Hypertext
Returns:
robot information