|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.dom4j.DOM4JUserAgent<C>
public abstract class DOM4JUserAgent<C>
User Agent based on DOM4J document trees.
| Constructor Summary | |
|---|---|
protected |
DOM4JUserAgent()
|
| Method Summary | |
|---|---|
void |
addDownloadListener(URL url,
DownloadListener<C> listener)
Adds a download listener for asynchronous retrieval of resources (embedded images, etc.) |
protected abstract ResourceDownloader<C> |
createDownloader(URL url)
|
ResourceDownloader<C> |
download(URL url)
Registers an URL for downloading with this user agent. |
ElementReplacer<C> |
getElementReplacer(String namespaceUri)
Gets the element replacer for the given namespace URI. |
ResourceDownloader<C> |
getResourceDownloader(URL url)
Gets the resource downloader for the given URL, creating one if none exists. |
abstract StyleDatabase |
getStyleDatabase()
Gets the style database used for the styles applied by this agent. |
XHTMLDocument |
readURL(URL url)
Convenience method that reads and parses an XHTML document located in the given URL, with a default entity resolver. |
XHTMLDocument |
readURL(URL url,
EntityResolver resolver)
Reads and parses an XHTML document located in the given URL. |
void |
setElementReplacer(String namespaceUri,
ElementReplacer<C> replacer)
Sets the element replacer for the given namespace URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DOM4JUserAgent()
| Method Detail |
|---|
public XHTMLDocument readURL(URL url)
throws IOException,
org.dom4j.DocumentException
url - the URL that points to the document.
IOException
org.dom4j.DocumentException
public XHTMLDocument readURL(URL url,
EntityResolver resolver)
throws IOException,
org.dom4j.DocumentException
url - the URL that points to the document.resolver - the entity resolver.
IOException
org.dom4j.DocumentExceptionpublic ResourceDownloader<C> download(URL url)
UserAgent
download in interface UserAgent<C>url - the URL to be downloaded.
public void addDownloadListener(URL url,
DownloadListener<C> listener)
UserAgentIn the process, it creates a resource downloader object.
addDownloadListener in interface UserAgent<C>url - the URL for the resource to be downloaded.listener - the download listener.public ResourceDownloader<C> getResourceDownloader(URL url)
UserAgent
getResourceDownloader in interface UserAgent<C>url - the URL.
public ElementReplacer<C> getElementReplacer(String namespaceUri)
UserAgent
getElementReplacer in interface UserAgent<C>namespaceUri - the namespace URI of the requested replacer.
If passed an empty string, will return the replacer for the
namespace of XHTML.
public void setElementReplacer(String namespaceUri,
ElementReplacer<C> replacer)
UserAgent
setElementReplacer in interface UserAgent<C>namespaceUri - the namespace URI of the supplied replacer.replacer - the element replacer.public abstract StyleDatabase getStyleDatabase()
UserAgent
getStyleDatabase in interface UserAgent<C>protected abstract ResourceDownloader<C> createDownloader(URL url)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||