Package org.apache.xerces.dom
Class PSVIDocumentImpl
java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.CoreDocumentImpl
org.apache.xerces.dom.DocumentImpl
org.apache.xerces.dom.PSVIDocumentImpl
- All Implemented Interfaces:
Serializable,Cloneable,Document,DocumentEvent,EventTarget,Node,NodeList,DocumentRange,DocumentTraversal
Our own document implementation, which knows how to create an element
with PSVI information.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: PSVIDocumentImpl.java 699892 2008-09-28 21:08:27Z mrglavas $
- Author:
- Sandy Gao, IBM
- See Also:
-
Field Summary
Fields inherited from class org.apache.xerces.dom.DocumentImpl
eventListeners, iteratorReferenceQueue, iterators, mutationEvents, rangeReferenceQueue, rangesFields inherited from class org.apache.xerces.dom.CoreDocumentImpl
actualEncoding, allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, fDocumentURI, identifiers, standalone, userData, version, xmlVersionChangedFields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocumentFields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSiblingFields 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, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, 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_NODEFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneNode(boolean deep) Deep-clone a document, including fixing ownerDoc for the cloned children.createAttributeNS(String namespaceURI, String qualifiedName) Create an attribute with PSVI informationcreateAttributeNS(String namespaceURI, String qualifiedName, String localName) Create an attribute with PSVI informationcreateElementNS(String namespaceURI, String qualifiedName) Create an element with PSVI informationcreateElementNS(String namespaceURI, String qualifiedName, String localpart) Create an element with PSVI informationThe configuration used whenDocument.normalizeDocumentis invoked.Retrieve information describing the abilities of this particular DOM implementation.Methods inherited from class org.apache.xerces.dom.DocumentImpl
addEventListener, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, dispatchingEventToSubtree, getEventListeners, removeEventListener, saveEnclosingAttr, setEventListenersMethods inherited from class org.apache.xerces.dom.CoreDocumentImpl
abort, adoptNode, callUserDataHandlers, canRenameElements, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, createAttribute, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElement, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, getAsync, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getElementById, getElementsByTagName, getElementsByTagNameNS, getEncoding, getErrorChecking, getFeature, getIdentifier, getIdentifiers, 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, removeIdentifier, renameNode, replaceChild, saveXML, setAsync, setDocumentURI, setEncoding, setErrorChecking, setInputEncoding, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setUserData, setVersion, setXmlEncoding, setXmlStandalone, setXmlVersion, undeferChildrenMethods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, isEqualNode, item, normalize, setOwnerDocument, setReadOnly, synchronizeChildrenMethods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSiblingMethods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getContainer, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, getUserDataRecord, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, synchronizeData, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, setNodeValue, setPrefix, setUserData
-
Constructor Details
-
PSVIDocumentImpl
public PSVIDocumentImpl()Create a document. -
PSVIDocumentImpl
For DOM2 support. The createDocument factory method is in DOMImplementation.
-
-
Method Details
-
cloneNode
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.- Specified by:
cloneNodein interfaceNode- Overrides:
cloneNodein classDocumentImpl- Parameters:
deep- boolean, iff true replicate children- Returns:
- org.w3c.dom.Node
- See Also:
-
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.- Specified by:
getImplementationin interfaceDocument- Overrides:
getImplementationin classDocumentImpl
-
createElementNS
Create an element with PSVI information- Specified by:
createElementNSin interfaceDocument- Overrides:
createElementNSin classCoreDocumentImpl- Parameters:
namespaceURI- The namespace URI of the element to create.qualifiedName- The qualified name of the element type to instantiate.- Returns:
- Element A new Element object with the following attributes:
- Throws:
DOMException- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.DOMException- NAMESPACE_ERR: Raised if the qualifiedName has a prefix that is "xml" and the namespaceURI is neither null nor an empty string nor "http://www.w3.org/XML/1998/namespace", or if the qualifiedName has a prefix different from "xml" and the namespaceURI is null or an empty string.
-
createElementNS
public Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException Create an element with PSVI information- Overrides:
createElementNSin classCoreDocumentImpl- Parameters:
namespaceURI- The namespace URI of the element to create.qualifiedName- The qualified name of the element type to instantiate.localpart- The local name of the attribute to instantiate.- Returns:
- Element A new Element object with the following attributes:
- Throws:
DOMException- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
-
createAttributeNS
Create an attribute with PSVI information- Specified by:
createAttributeNSin interfaceDocument- Overrides:
createAttributeNSin classCoreDocumentImpl- Parameters:
namespaceURI- The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.qualifiedName- The qualified name of the attribute to instantiate.- Returns:
- Attr A new Attr object.
- Throws:
DOMException- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
-
createAttributeNS
public Attr createAttributeNS(String namespaceURI, String qualifiedName, String localName) throws DOMException Create an attribute with PSVI information- Overrides:
createAttributeNSin classCoreDocumentImpl- Parameters:
namespaceURI- The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.qualifiedName- The qualified name of the attribute to instantiate.localName- The local name of the attribute to instantiate.- Returns:
- Attr A new Attr object.
- Throws:
DOMException- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
-
getDomConfig
The configuration used whenDocument.normalizeDocumentis invoked.- Specified by:
getDomConfigin interfaceDocument- Overrides:
getDomConfigin classCoreDocumentImpl- Since:
- DOM Level 3
-