org.apache.xerces.dom

Class PSVIDocumentImpl

Implemented Interfaces:
Cloneable, Document, DocumentEvent, DocumentRange, DocumentTraversal, EventTarget, Node, NodeList, Serializable

public class PSVIDocumentImpl
extends DocumentImpl

Our own document implementation, which knows how to create an element with PSVI information.
Version:
$Id: PSVIDocumentImpl.java,v 1.12 2005/05/02 22:03:58 mrglavas Exp $
Author:
Sandy Gao, IBM

Field Summary

Fields inherited from class org.apache.xerces.dom.DocumentImpl

eventListeners, iterators, mutationEvents, ranges

Fields inherited from class org.apache.xerces.dom.CoreDocumentImpl

actualEncoding, allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, fDocumentURI, identifiers, standalone, userData, version, xmlVersionChanged

Fields inherited from class org.apache.xerces.dom.ParentNode

fNodeListCache, firstChild, ownerDocument

Fields inherited from class org.apache.xerces.dom.ChildNode

nextSibling, previousSibling

Fields inherited from class org.apache.xerces.dom.NodeImpl

DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, flags, ownerNode

Constructor Summary

PSVIDocumentImpl()
Create a document.
PSVIDocumentImpl(DocumentType doctype)
For DOM2 support.

Method Summary

Node
cloneNode(boolean deep)
Deep-clone a document, including fixing ownerDoc for the cloned children.
Attr
createAttributeNS(String namespaceURI, String qualifiedName)
Create an attribute with PSVI information
Attr
createAttributeNS(String namespaceURI, String qualifiedName, String localName)
Create an attribute with PSVI information
Element
createElementNS(String namespaceURI, String qualifiedName)
Create an element with PSVI information
Element
createElementNS(String namespaceURI, String qualifiedName, String localpart)
Create an element with PSVI information
DOMConfiguration
getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
DOMImplementation
getImplementation()
Retrieve information describing the abilities of this particular DOM implementation.

Methods inherited from class org.apache.xerces.dom.DocumentImpl

addEventListener, cloneNode, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, dispatchingEventToSubtree, getEventListeners, getImplementation, removeEventListener, saveEnclosingAttr, setEventListeners

Methods inherited from class org.apache.xerces.dom.CoreDocumentImpl

abort, addEventListener, adoptNode, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, cloneNode, copyEventListeners, createAttribute, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElement, createElementDefinition, createElementNS, createElementNS, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, dispatchEvent, getAsync, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getErrorChecking, getFeature, getIdentifier, getIdentifiers, getImplementation, getInputEncoding, getNodeName, getNodeNumber, getNodeNumber, getNodeType, getOwnerDocument, getStandalone, getStrictErrorChecking, getTextContent, getUserData, getUserData, getUserDataRecord, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, insertBefore, isKidOK, isValidQName, isXMLName, load, loadXML, normalizeDocument, putIdentifier, removeChild, removeEventListener, removeIdentifier, renameNode, replaceChild, saveXML, setAsync, setDocumentURI, setEncoding, setErrorChecking, setInputEncoding, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setUserData, setVersion, setXmlEncoding, setXmlStandalone, setXmlVersion, undeferChildren

Methods inherited from class org.apache.xerces.dom.ParentNode

cloneNode, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, isEqualNode, item, normalize, removeChild, replaceChild, setReadOnly, setTextContent, synchronizeChildren

Methods inherited from class org.apache.xerces.dom.ChildNode

cloneNode, getNextSibling, getParentNode, getPreviousSibling

Methods inherited from class org.apache.xerces.dom.NodeImpl

addEventListener, appendChild, changed, changes, cloneNode, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getContainer, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getTextContent, getUserData, getUserData, getUserDataRecord, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, needsSyncChildren, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setPrefix, setReadOnly, setTextContent, setUserData, setUserData, synchronizeData, toString

Constructor Details

PSVIDocumentImpl

public PSVIDocumentImpl()
Create a document.

PSVIDocumentImpl

public PSVIDocumentImpl(DocumentType doctype)
For DOM2 support. The createDocument factory method is in DOMImplementation.

Method Details

cloneNode

public Node cloneNode(boolean deep)
Deep-clone a document, including fixing ownerDoc for the cloned children. Note that this requires bypassing the WRONG_DOCUMENT_ERR protection. I've chosen to implement it by calling importNode which is DOM Level 2.
Overrides:
cloneNode in interface DocumentImpl
Parameters:
deep - boolean, iff true replicate children
Returns:
org.w3c.dom.Node

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
            throws DOMException
Create an attribute with PSVI information
Overrides:
createAttributeNS in interface CoreDocumentImpl

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName,
                              String localName)
            throws DOMException
Create an attribute with PSVI information
Overrides:
createAttributeNS in interface CoreDocumentImpl

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)
            throws DOMException
Create an element with PSVI information
Overrides:
createElementNS in interface CoreDocumentImpl

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName,
                               String localpart)
            throws DOMException
Create an element with PSVI information
Overrides:
createElementNS in interface CoreDocumentImpl

getDomConfig

public DOMConfiguration getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
Overrides:
getDomConfig in interface CoreDocumentImpl
Since:
DOM Level 3

getImplementation

public DOMImplementation getImplementation()
Retrieve information describing the abilities of this particular DOM implementation. Intended to support applications that may be using DOMs retrieved from several different sources, potentially with different underlying representations.
Overrides:
getImplementation in interface DocumentImpl

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.