org.osjava.scraping
Class AbstractPage

java.lang.Object
  extended byorg.osjava.scraping.AbstractPage
All Implemented Interfaces:
Page
Direct Known Subclasses:
MemoryPage, NullPage

public abstract class AbstractPage
extends java.lang.Object
implements Page


Constructor Summary
AbstractPage()
           
 
Method Summary
 Page fetch(java.lang.String uri, com.generationjava.config.Config cfg, org.osjava.oscube.container.Session session)
           
 java.lang.String getDocumentBase()
          Set the documentBase.
 java.lang.String getType()
           
abstract  java.io.Reader read()
           
 java.lang.String readAsString()
           
 void setDocumentBase(java.lang.String documentBase)
           
protected  void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPage

public AbstractPage()
Method Detail

setType

protected void setType(java.lang.String type)

getType

public java.lang.String getType()
Specified by:
getType in interface Page

read

public abstract java.io.Reader read()
                             throws java.io.IOException
Specified by:
read in interface Page
Throws:
java.io.IOException

fetch

public Page fetch(java.lang.String uri,
                  com.generationjava.config.Config cfg,
                  org.osjava.oscube.container.Session session)
           throws FetchingException
Specified by:
fetch in interface Page
Throws:
FetchingException

setDocumentBase

public void setDocumentBase(java.lang.String documentBase)
Specified by:
setDocumentBase in interface Page

getDocumentBase

public java.lang.String getDocumentBase()
Set the documentBase. This is the path of the current directory that has been fetched, so local urls may be understood. It does not include a '/' on the end.

Specified by:
getDocumentBase in interface Page

readAsString

public java.lang.String readAsString()
                              throws java.io.IOException
Specified by:
readAsString in interface Page
Throws:
java.io.IOException


Copyright © 2003-2005 OSJava. All Rights Reserved.