Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.dom

public Class PSVIDocumentImpl

extends DocumentImpl
Class Inheritance
Imports
java.io.IOException, .NotSerializableException, .ObjectInputStream, .ObjectOutputStream, org.w3c.dom.DOMConfiguration, .UserDataHandler, org.w3c.dom.*

Our own document implementation, which knows how to create an element with PSVI information.
Author
Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
pack-priv static final long
Inherited from com.sun.org.apache.xerces.internal.dom.DocumentImpl:
eventListenersiteratorsmutationEventsrangessavedEnclosingAttr

Constructor Summary

AccessConstructor and Description
public
PSVIDocumentImpl()

Create a document.

public
PSVIDocumentImpl(DocumentType doctype)

For DOM2 support.

Method Summary

Modifier and TypeMethod and Description
public Node

Returns:

org.w3c.dom.Node
cloneNode
(boolean
boolean, iff true replicate children
deep
)

Overrides com.sun.org.apache.xerces.internal.dom.DocumentImpl.cloneNode.

Implements org.w3c.dom.Node.cloneNode.

Deep-clone a document, including fixing ownerDoc for the cloned children.

public Attr
createAttributeNS(String
The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.
namespaceURI
,
String
The qualified name of the attribute to instantiate.
qualifiedName
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Implements org.w3c.dom.Document.createAttributeNS.

Create an attribute with PSVI information

public Attr
createAttributeNS(String
The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.
namespaceURI
,
String
The qualified name of the attribute to instantiate.
qualifiedName
,
String
The local name of the attribute to instantiate.
localName
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Create an attribute with PSVI information

public Element
createElementNS(String
The namespace URI of the element to create.
namespaceURI
,
String
The qualified name of the element type to instantiate.
qualifiedName
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Implements org.w3c.dom.Document.createElementNS.

Create an element with PSVI information

public Element
createElementNS(String
The namespace URI of the element to create.
namespaceURI
,
String
The qualified name of the element type to instantiate.
qualifiedName
,
String
The local name of the attribute to instantiate.
localpart
)

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Create an element with PSVI information

public DOMConfiguration
getDomConfig()

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.getDomConfig.

Implements org.w3c.dom.Document.getDomConfig.

The configuration used when Document.normalizeDocument is invoked.

public DOMImplementation
getImplementation()

Overrides com.sun.org.apache.xerces.internal.dom.DocumentImpl.getImplementation.

Implements org.w3c.dom.Document.getImplementation.

Retrieve information describing the abilities of this particular DOM implementation.

private void
private void
Inherited from com.sun.org.apache.xerces.internal.dom.DocumentImpl:
addEventListenercopyEventListenerscreateEventcreateNodeIteratorcreateNodeIteratorcreateRangecreateTreeWalkercreateTreeWalkerdeletedTextdispatchAggregateEventsdispatchAggregateEventsdispatchEventdispatchEventToSubtreedispatchingEventToSubtreegetEventListenersgetMutationEventsinsertedNodeinsertedTextinsertingNodemodifiedAttrValuemodifiedCharacterDatamodifyingCharacterDataremovedAttrNoderemovedNoderemoveEventListenerremoveNodeIteratorremoveRangeremovingNoderenamedAttrNoderenamedElementreplacedCharacterDatareplacedNodereplacedTextreplacingDatareplacingNodesaveEnclosingAttrsetAttrNodesetEventListenerssetMutationEventssplitData

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xerces.internal.dom.DocumentImpl.serialVersionUID.

Serialization version.

Constructor Detail

PSVIDocumentImplback to summary
public PSVIDocumentImpl()

Create a document.

PSVIDocumentImplback to summary
public PSVIDocumentImpl(DocumentType doctype)

For DOM2 support. The createDocument factory method is in DOMImplementation.

Method Detail

cloneNodeback to summary
public Node cloneNode(boolean deep)

Overrides com.sun.org.apache.xerces.internal.dom.DocumentImpl.cloneNode.

Implements org.w3c.dom.Node.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.

Parameters
deep:boolean

boolean, iff true replicate children

Returns:Node

org.w3c.dom.Node

createAttributeNSback to summary
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Implements org.w3c.dom.Document.createAttributeNS.

Create an attribute with PSVI information

Parameters
namespaceURI:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.

qualifiedName:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

The qualified name of the attribute to instantiate.

Returns:Attr

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Attr A new Attr object.

Exceptions
DOMException:

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createAttributeNSback to summary
public Attr createAttributeNS(String namespaceURI, String qualifiedName, String localName) throws DOMException

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Create an attribute with PSVI information

Parameters
namespaceURI:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

The namespace URI of the attribute to create. When it is null or an empty string, this method behaves like createAttribute.

qualifiedName:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

The qualified name of the attribute to instantiate.

localName:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

The local name of the attribute to instantiate.

Returns:Attr

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

Attr A new Attr object.

Exceptions
DOMException:

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS.

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

createElementNSback to summary
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Implements org.w3c.dom.Document.createElementNS.

Create an element with PSVI information

Parameters
namespaceURI:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

The namespace URI of the element to create.

qualifiedName:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

The qualified name of the element type to instantiate.

Returns:Element

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Element A new Element object with the following attributes:

Exceptions
DOMException:

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

  • INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
  • 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.
createElementNSback to summary
public Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Create an element with PSVI information

Parameters
namespaceURI:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

The namespace URI of the element to create.

qualifiedName:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

The qualified name of the element type to instantiate.

localpart:String

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

The local name of the attribute to instantiate.

Returns:Element

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

Element A new Element object with the following attributes:

Exceptions
DOMException:

Doc from com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createElementNS.

INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.

getDomConfigback to summary
public DOMConfiguration getDomConfig()

Overrides com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.getDomConfig.

Implements org.w3c.dom.Document.getDomConfig.

The configuration used when Document.normalizeDocument is invoked.

Since
DOM Level 3
getImplementationback to summary
public DOMImplementation getImplementation()

Overrides com.sun.org.apache.xerces.internal.dom.DocumentImpl.getImplementation.

Implements org.w3c.dom.Document.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.

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides com.sun.org.apache.xerces.internal.dom.DocumentImpl.readObject.

Doc from com.sun.org.apache.xerces.internal.dom.ParentNode.readObject.

Deserialize object.

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Hides com.sun.org.apache.xerces.internal.dom.DocumentImpl.writeObject.

Doc from com.sun.org.apache.xerces.internal.dom.ParentNode.writeObject.

Serialize object.