textbender.o.rhinohide.core
Class RhiDocument

java.lang.Object
  extended by Rhinohide
      extended by RhiEventTarget
          extended by RhiNode
              extended by RhiDocument
All Implemented Interfaces:
Document, EventTarget, Node, DocumentRange, DocumentTraversal, DocumentView
Direct Known Subclasses:
RhiHTMLDocument

@ThreadSafe
public class RhiDocument
extends RhiNode
implements Document, DocumentRange, DocumentTraversal, DocumentView

A document implemented as an overlay of a JavaScript document. The orthodox way to obtain the document displayed by the browser is RhiWindow.getDocument().


Field Summary
 
Fields inherited from class Rhinohide
window
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
protected RhiDocument(RhiWindow window, netscape.javascript.JSObject jsObject)
           
 
Method Summary
 Node adoptNode(Node source)
          Not yet coded.
 Attr createAttribute(String name)
           
 Attr createAttributeNS(String namespaceURI, String qualifiedName)
          Untested
 CDATASection createCDATASection(String data)
          Not yet coded.
 Comment createComment(String data)
           
 DocumentFragment createDocumentFragment()
           
 Element createElement(String tagName)
           
 Element createElementNS(String namespaceURI, String qualifiedName)
           
 EntityReference createEntityReference(String name)
          Not yet coded.
 NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion)
           
 ProcessingInstruction createProcessingInstruction(String target, String data)
          Not yet coded.
 Range createRange()
           
 Text createTextNode(String data)
           
 TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion)
           
 AbstractView getDefaultView()
          Not yet coded.
 DocumentType getDoctype()
           
 Element getDocumentElement()
           
 String getDocumentURI()
          Untested.
 DOMConfiguration getDomConfig()
          Not yet coded.
 Element getElementById(String elementId)
           
 NodeList getElementsByTagName(String name)
           
 NodeList getElementsByTagNameNS(String namespaceURI, String localName)
          Untested.
 DOMImplementation getImplementation()
           
 String getInputEncoding()
          Untested.
 boolean getStrictErrorChecking()
          Not yet coded.
 String getXmlEncoding()
           
 boolean getXmlStandalone()
          Not yet coded.
 String getXmlVersion()
           
 Node importNode(Node importedNode, boolean deep)
          Not yet coded.
 void normalizeDocument()
          Untested.
 Node renameNode(Node n, String namespaceURI, String qualifiedName)
          Not yet coded.
 void setDocumentURI(String documentURI)
          Not yet coded.
 void setStrictErrorChecking(boolean strictErrorChecking)
          Not yet coded.
 void setXmlStandalone(boolean xmlStandalone)
          Not yet coded.
 void setXmlVersion(String xmlVersion)
          Not yet coded.
static RhiDocument wrapDocument(RhiWindow window, netscape.javascript.JSObject jsObject)
          Creates a RhiDocument.
(package private) static RhiDocument wrapDocument(RhiWindow window, netscape.javascript.JSObject jsObject, boolean doTypeCheck)
           
 
Methods inherited from class RhiNode
appendChild, cloneNode, compareDocumentPosition, ensureNodeType, equals, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, wrapNode, wrapNode
 
Methods inherited from class RhiEventTarget
addEventListener, dispatchEvent, removeEventListener, wrapEventTarget
 
Methods inherited from class Rhinohide
call, callV, checkV, eval, evalV, getMember, getMemberV, jsObject, setMember, toJSObject, toString, window
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

RhiDocument

protected RhiDocument(RhiWindow window,
                      netscape.javascript.JSObject jsObject)
Method Detail

wrapDocument

public static RhiDocument wrapDocument(RhiWindow window,
                                       netscape.javascript.JSObject jsObject)
Creates a RhiDocument.

Parameters:
window - global object
jsObject - bridge to underlying JavaScript document, per jsObject()
Returns:
document, or null if jsObject is null
Throws:
IllegalArgumentException - if jsObject is neither null nor a document

wrapDocument

static RhiDocument wrapDocument(RhiWindow window,
                                netscape.javascript.JSObject jsObject,
                                boolean doTypeCheck)

adoptNode

public final Node adoptNode(Node source)
Not yet coded.

Specified by:
adoptNode in interface Document
Throws:
UnsupportedOperationException

createAttribute

public final Attr createAttribute(String name)
Specified by:
createAttribute in interface Document

createAttributeNS

public final Attr createAttributeNS(String namespaceURI,
                                    String qualifiedName)
Untested

Specified by:
createAttributeNS in interface Document

createCDATASection

public final CDATASection createCDATASection(String data)
Not yet coded.

Specified by:
createCDATASection in interface Document
Throws:
UnsupportedOperationException

createComment

public final Comment createComment(String data)
Specified by:
createComment in interface Document

createDocumentFragment

public final DocumentFragment createDocumentFragment()
Specified by:
createDocumentFragment in interface Document

createElement

public final Element createElement(String tagName)
Specified by:
createElement in interface Document

createElementNS

public final Element createElementNS(String namespaceURI,
                                     String qualifiedName)
Specified by:
createElementNS in interface Document

createEntityReference

public final EntityReference createEntityReference(String name)
Not yet coded.

Specified by:
createEntityReference in interface Document
Throws:
UnsupportedOperationException

createProcessingInstruction

public final ProcessingInstruction createProcessingInstruction(String target,
                                                               String data)
Not yet coded.

Specified by:
createProcessingInstruction in interface Document
Throws:
UnsupportedOperationException

createTextNode

public final Text createTextNode(String data)
Specified by:
createTextNode in interface Document

getDoctype

public final DocumentType getDoctype()
Specified by:
getDoctype in interface Document

getDocumentElement

public final Element getDocumentElement()
Specified by:
getDocumentElement in interface Document

getDocumentURI

public final String getDocumentURI()
Untested.

Specified by:
getDocumentURI in interface Document

setDocumentURI

public final void setDocumentURI(String documentURI)
Not yet coded.

Specified by:
setDocumentURI in interface Document
Throws:
UnsupportedOperationException

getDomConfig

public final DOMConfiguration getDomConfig()
Not yet coded.

Specified by:
getDomConfig in interface Document
Throws:
UnsupportedOperationException

getElementById

public final Element getElementById(String elementId)
Specified by:
getElementById in interface Document

getElementsByTagName

public final NodeList getElementsByTagName(String name)
Specified by:
getElementsByTagName in interface Document

getElementsByTagNameNS

public final NodeList getElementsByTagNameNS(String namespaceURI,
                                             String localName)
Untested.

Specified by:
getElementsByTagNameNS in interface Document

getImplementation

public final DOMImplementation getImplementation()
Specified by:
getImplementation in interface Document

getInputEncoding

public final String getInputEncoding()
Untested.

Specified by:
getInputEncoding in interface Document

getStrictErrorChecking

public final boolean getStrictErrorChecking()
Not yet coded.

Specified by:
getStrictErrorChecking in interface Document
Throws:
UnsupportedOperationException

setStrictErrorChecking

public final void setStrictErrorChecking(boolean strictErrorChecking)
Not yet coded.

Specified by:
setStrictErrorChecking in interface Document
Throws:
UnsupportedOperationException

getXmlEncoding

public final String getXmlEncoding()
Specified by:
getXmlEncoding in interface Document

getXmlStandalone

public final boolean getXmlStandalone()
Not yet coded.

Specified by:
getXmlStandalone in interface Document
Throws:
UnsupportedOperationException

setXmlStandalone

public final void setXmlStandalone(boolean xmlStandalone)
Not yet coded.

Specified by:
setXmlStandalone in interface Document
Throws:
UnsupportedOperationException

getXmlVersion

public final String getXmlVersion()
Specified by:
getXmlVersion in interface Document

setXmlVersion

public final void setXmlVersion(String xmlVersion)
Not yet coded.

Specified by:
setXmlVersion in interface Document
Throws:
UnsupportedOperationException

importNode

public final Node importNode(Node importedNode,
                             boolean deep)
Not yet coded.

Specified by:
importNode in interface Document
Throws:
UnsupportedOperationException

normalizeDocument

public final void normalizeDocument()
Untested.

Specified by:
normalizeDocument in interface Document

renameNode

public final Node renameNode(Node n,
                             String namespaceURI,
                             String qualifiedName)
Not yet coded.

Specified by:
renameNode in interface Document
Throws:
UnsupportedOperationException

createRange

public final Range createRange()
Specified by:
createRange in interface DocumentRange

createNodeIterator

public final NodeIterator createNodeIterator(Node root,
                                             int whatToShow,
                                             NodeFilter filter,
                                             boolean entityReferenceExpansion)
Specified by:
createNodeIterator in interface DocumentTraversal
Throws:
UnsupportedOperationException - because it's not yet implemented in browsers (Mozilla), so we haven't coded it yet

createTreeWalker

public final TreeWalker createTreeWalker(Node root,
                                         int whatToShow,
                                         NodeFilter filter,
                                         boolean entityReferenceExpansion)
Specified by:
createTreeWalker in interface DocumentTraversal
Throws:
IllegalArgumentException - if filter is not null, because we haven't coded that part yet

getDefaultView

public final AbstractView getDefaultView()
Not yet coded.

Specified by:
getDefaultView in interface DocumentView
Throws:
UnsupportedOperationException