fi.hut.tml.xsmiles.content.html
Class HTMLDocument

java.lang.Object
  extended byfi.hut.tml.xsmiles.XSmilesXMLDocument
      extended byfi.hut.tml.xsmiles.content.html.HTMLDocument
All Implemented Interfaces:
MediaQueryEvaluator, XMLDocument

public class HTMLDocument
extends XSmilesXMLDocument
implements XMLDocument

The XMLdocument is an object that can retrieve and parse a XML document when given the URL of the document as an argument in the constructor. The document can then be accessed through the DOM-interface that it provides. The document also saves the original source of the document, so that the source can be given to any component that is interested of it (for example the SourceViewMLFC)

Version:
$Revision: 5268 $
Author:
Kreivi, Mikko Honkala

Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.XSmilesXMLDocument
currentScripter, currentStylesheetTitle, destXMLDoc, m_browser, m_engine, m_link, m_parser, m_stream, mlfc, parserClass, preferredTitle, sourceXMLDoc, sourceXMLURL, stylesheetTitles, trueDocument, XSLDoc, xslProcessor, XSLURL
 
Fields inherited from interface fi.hut.tml.xsmiles.mlfc.general.MediaQueryEvaluator
MEDIA_TYPES
 
Constructor Summary
HTMLDocument(BrowserWindow browser, org.w3c.dom.Document doc)
          Another alternative constructor
HTMLDocument(BrowserWindow browser, java.io.InputStream stream, XLink link)
          This constructor is used by the Browser when it requests a new XMLdocument.
HTMLDocument(BrowserWindow browser, java.lang.String s)
          An alternative constructor, where the source can be given as a string.
HTMLDocument(BrowserWindow browser, XLink link)
          This constructor is used by the Browser when it requests a new XMLdocument.
 
Method Summary
protected  org.w3c.dom.Document readWithNekoHTML(java.net.URL sourceURL, java.io.InputStream stream)
          This method reads the URL using Neko HTML
 void retrieveDocument()
          This is the method that performs all the actual work of the XMLDocument.
 
Methods inherited from class fi.hut.tml.xsmiles.XSmilesXMLDocument
acquireToken, createDomFromString, deactivate, evalMediaQuery, fetchAndSetDOM, fetchXMLDOM, fetchXMLDOM, fetchXMLDOM, findXSL, getAttribute, getBrowser, getCurrentStylesheetTitle, getDocument, getECMAScripter, getLink, getMLName, getSourceEnumeration, getSourceText, getSourceText, getSourceVector, getStylesheetTitles, getXMLDocument, getXMLURL, getXMLVector, getXSLDocument, getXSLURL, getXSLVector, init, init, insertSourceIntoEditor, isTrueDocument, processStyleSheet, releaseToken, setPreferredStylesheetTitle, sourceStringToVector, transformDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.XMLDocument
deactivate, evalMediaQuery, getBrowser, getCurrentStylesheetTitle, getDocument, getECMAScripter, getLink, getSourceText, getSourceVector, getStylesheetTitles, getXMLDocument, getXMLURL, getXMLVector, getXSLDocument, getXSLURL, getXSLVector, setPreferredStylesheetTitle
 

Constructor Detail

HTMLDocument

public HTMLDocument(BrowserWindow browser,
                    XLink link)
This constructor is used by the Browser when it requests a new XMLdocument.
The DOM-implementation is set here.


HTMLDocument

public HTMLDocument(BrowserWindow browser,
                    java.io.InputStream stream,
                    XLink link)
This constructor is used by the Browser when it requests a new XMLdocument.
The DOM-implementation is set here.


HTMLDocument

public HTMLDocument(BrowserWindow browser,
                    java.lang.String s)
An alternative constructor, where the source can be given as a string.


HTMLDocument

public HTMLDocument(BrowserWindow browser,
                    org.w3c.dom.Document doc)
Another alternative constructor

Parameters:
browser - The BrowserWindow
doc - The Document
Method Detail

retrieveDocument

public void retrieveDocument()
                      throws java.lang.Exception
This is the method that performs all the actual work of the XMLDocument. It fetches and parses the document (determined in the constructor) and makes the document available for use by the other browser components. The handle to the DOM-interface is kept in a variable called doc. Run by a separate thread, so that fetching can be interrupted, for example in error situations.

Specified by:
retrieveDocument in interface XMLDocument
Overrides:
retrieveDocument in class XSmilesXMLDocument
Throws:
java.lang.Exception

readWithNekoHTML

protected org.w3c.dom.Document readWithNekoHTML(java.net.URL sourceURL,
                                                java.io.InputStream stream)
                                         throws java.lang.Exception
This method reads the URL using Neko HTML

Throws:
java.lang.Exception


X-Smiles 1.2