org.enhydra.xml.xmlc.dom.generic
Class GenericLinkedDocument

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.generic.GenericLinkedDocument
All Implemented Interfaces:
Document, Node, XMLObjectLink
Direct Known Subclasses:
GenericLinkedHTMLDocument

public class GenericLinkedDocument
extends Object
implements Document, XMLObjectLink

This is a generic wrapper around Document that adds XMLObjectLink functionality.


Field Summary
protected  Document DELEGATE
          Delegate document
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
GenericLinkedDocument(Document inner)
          Constructor.
 
Method Summary
 Node adoptNode(Node source)
           
 Node appendChild(Node newChild)
           
 Node cloneNode(boolean deep)
           
 Attr createAttribute(String name)
           
 Attr createAttributeNS(String namespaceURI, String qualifiedName)
           
 CDATASection createCDATASection(String data)
           
 Comment createComment(String data)
           
 DocumentFragment createDocumentFragment()
           
 Element createElement(String tagName)
           
 Element createElementNS(String namespaceURI, String qualifiedName)
           
 EntityReference createEntityReference(String name)
           
 ProcessingInstruction createProcessingInstruction(String target, String data)
           
 Text createTextNode(String data)
           
 NamedNodeMap getAttributes()
           
 NodeList getChildNodes()
           
 DocumentType getDoctype()
           
 Element getDocumentElement()
           
 Element getElementById(String elementId)
           
 NodeList getElementsByTagName(String tagname)
           
 NodeList getElementsByTagNameNS(String namespaceURI, String localName)
           
 String getEncoding()
           
 Node getFirstChild()
           
 DOMImplementation getImplementation()
           
 Node getLastChild()
           
 String getLocalName()
           
 String getNamespaceURI()
           
 Node getNextSibling()
           
 String getNodeName()
           
 short getNodeType()
           
 String getNodeValue()
           
 Document getOwnerDocument()
           
 Node getParentNode()
           
 String getPrefix()
           
 Node getPreviousSibling()
           
 boolean getStandalone()
           
 boolean getStrictErrorChecking()
           
 String getVersion()
           
 XMLObject getXMLObject()
          Get the XMLC XMLObject that contains this document, or null it it's not associated with a XMLObject.
 boolean hasAttributes()
           
 boolean hasChildNodes()
           
 Node importNode(Node importedNode, boolean deep)
           
 Node insertBefore(Node newChild, Node refChild)
           
 boolean isSupported(String feature, String version)
           
 void normalize()
           
 Node removeChild(Node oldChild)
           
 Node replaceChild(Node newChild, Node oldChild)
           
 void setEncoding(String encoding)
           
 void setNodeValue(String nodeValue)
           
 void setPrefix(String prefix)
           
 void setStandalone(boolean standalone)
           
 void setStrictErrorChecking(boolean strictErrorChecking)
           
 void setVersion(String version)
           
 void setXMLObject(XMLObject xmlObject)
          Set the XMLC XMLObject that contains this document.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELEGATE

protected final Document DELEGATE
Delegate document
Constructor Detail

GenericLinkedDocument

public GenericLinkedDocument(Document inner)
Constructor.
Parameters:
inner - the document to be wrapped.
Method Detail

setXMLObject

public void setXMLObject(XMLObject xmlObject)
Description copied from interface: XMLObjectLink
Set the XMLC XMLObject that contains this document.
Specified by:
setXMLObject in interface XMLObjectLink
See Also:
XMLObjectLink.setXMLObject(org.enhydra.xml.xmlc.XMLObject)

getXMLObject

public XMLObject getXMLObject()
Description copied from interface: XMLObjectLink
Get the XMLC XMLObject that contains this document, or null it it's not associated with a XMLObject.
Specified by:
getXMLObject in interface XMLObjectLink
See Also:
XMLObjectLink.getXMLObject()

cloneNode

public Node cloneNode(boolean deep)
Specified by:
cloneNode in interface Node
See Also:
Node.cloneNode(boolean)

getDoctype

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

getImplementation

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

getDocumentElement

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

createElement

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

createDocumentFragment

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

createTextNode

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

createComment

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

createCDATASection

public CDATASection createCDATASection(String data)
                                throws DOMException
Specified by:
createCDATASection in interface Document

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target,
                                                         String data)
                                                  throws DOMException
Specified by:
createProcessingInstruction in interface Document

createAttribute

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

createEntityReference

public EntityReference createEntityReference(String name)
                                      throws DOMException
Specified by:
createEntityReference in interface Document

getElementsByTagName

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

importNode

public Node importNode(Node importedNode,
                       boolean deep)
                throws DOMException
Specified by:
importNode in interface Document

createElementNS

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

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
                       throws DOMException
Specified by:
createAttributeNS in interface Document

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String localName)
Specified by:
getElementsByTagNameNS in interface Document

getElementById

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

getNodeName

public String getNodeName()
Specified by:
getNodeName in interface Node

getNodeValue

public String getNodeValue()
                    throws DOMException
Specified by:
getNodeValue in interface Node

setNodeValue

public void setNodeValue(String nodeValue)
                  throws DOMException
Specified by:
setNodeValue in interface Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface Node

getParentNode

public Node getParentNode()
Specified by:
getParentNode in interface Node

getChildNodes

public NodeList getChildNodes()
Specified by:
getChildNodes in interface Node

getFirstChild

public Node getFirstChild()
Specified by:
getFirstChild in interface Node

getLastChild

public Node getLastChild()
Specified by:
getLastChild in interface Node

getPreviousSibling

public Node getPreviousSibling()
Specified by:
getPreviousSibling in interface Node

getNextSibling

public Node getNextSibling()
Specified by:
getNextSibling in interface Node

getAttributes

public NamedNodeMap getAttributes()
Specified by:
getAttributes in interface Node

getOwnerDocument

public Document getOwnerDocument()
Specified by:
getOwnerDocument in interface Node

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Specified by:
insertBefore in interface Node

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
                  throws DOMException
Specified by:
replaceChild in interface Node

removeChild

public Node removeChild(Node oldChild)
                 throws DOMException
Specified by:
removeChild in interface Node

appendChild

public Node appendChild(Node newChild)
                 throws DOMException
Specified by:
appendChild in interface Node

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface Node

normalize

public void normalize()
Specified by:
normalize in interface Node

isSupported

public boolean isSupported(String feature,
                           String version)
Specified by:
isSupported in interface Node

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface Node

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface Node

setPrefix

public void setPrefix(String prefix)
               throws DOMException
Specified by:
setPrefix in interface Node

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface Node

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface Node

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

getStandalone

public boolean getStandalone()

setStandalone

public void setStandalone(boolean standalone)

getStrictErrorChecking

public boolean getStrictErrorChecking()

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

adoptNode

public Node adoptNode(Node source)
               throws DOMException


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.