com.novell.xml.dom
Class DocumentTypeImpl

java.lang.Object
  extended bycom.novell.xml.dom.NodeImpl
      extended bycom.novell.xml.dom.DocumentTypeImpl
All Implemented Interfaces:
Cloneable, Comparable, DocumentType, Node

public class DocumentTypeImpl
extends NodeImpl
implements DocumentType

Novell implementation of DOM level 2 DocumentType interface


Field Summary
 
Fields inherited from class com.novell.xml.dom.NodeImpl
allowedChildren, baseURI, changeCount, document, documentOrderVal, expandedName, firstChild, lastChild, localName, namespaceURI, nextOrderVal, nextSibling, nodeName, nodeValue, parentNode, prefix, previousSibling, toStringSerializes, xmlnsPrefix, xmlPrefix, xpathBehavior
 
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
protected DocumentTypeImpl(DocumentImpl owner, String name, String publicId, String systemId, String internalSubset)
           
 
Method Summary
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 NamedNodeMap getEntities()
          A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.
 String getInternalSubset()
          The internal subset as a string.The actual content returned depends on how much information is available to the implementation.
 String getName()
          The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
 short getNodeType()
          A code representing the type of the underlying object, as defined above.
 NamedNodeMap getNotations()
          A NamedNodeMap containing the notations declared in the DTD.
 String getPublicId()
          The public identifier of the external subset.
 String getSystemId()
          The system identifier of the external subset.
 void setInternalSubset(String internalSubset)
          Set the internal subset non-DOM
 void setName(String name)
          Set the name of the DTD non-DOM
 
Methods inherited from class com.novell.xml.dom.NodeImpl
appendChild, checkName, checkNameNS, compareTo, fetchNamespacesFromDecls, gateModify, getAttributes, getBaseURI, getChangeCount, getChildNodes, getColumnNumber, getDocumentOrder, getExpandedName, getFirstChild, getLastChild, getLineNumber, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, incChangeCount, insertBefore, isChildAllowed, isReadOnly, isSupported, normalize, purgeCachedExpandedNames, removeChild, replaceChild, setBaseURI, setColumnNumber, setDeepReadOnly, setDocumentOrder, setLineNumber, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setXPathBehavior, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Constructor Detail

DocumentTypeImpl

protected DocumentTypeImpl(DocumentImpl owner,
                           String name,
                           String publicId,
                           String systemId,
                           String internalSubset)
Method Detail

getNodeType

public short getNodeType()
A code representing the type of the underlying object, as defined above.

Specified by:
getNodeType in interface Node
Specified by:
getNodeType in class NodeImpl

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.

Specified by:
cloneNode in interface Node
Overrides:
cloneNode in class NodeImpl
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

getName

public String getName()
The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

Specified by:
getName in interface DocumentType

getEntities

public NamedNodeMap getEntities()
A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Duplicates are discarded. For example in:<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar "bar"> <!ENTITY % baz "baz">]> <ex/> the interface provides access to foo and bar but not baz. Every node in this map also implements the Entity interface.
The DOM Level 1 does not support editing entities, therefore entities cannot be altered in any way.

Specified by:
getEntities in interface DocumentType

getNotations

public NamedNodeMap getNotations()
A NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation interface.
The DOM Level 1 does not support editing notations, therefore notations cannot be altered in any way.

Specified by:
getNotations in interface DocumentType

setName

public void setName(String name)
Set the name of the DTD non-DOM

Parameters:
name - The name to set

getPublicId

public String getPublicId()
The public identifier of the external subset.

Specified by:
getPublicId in interface DocumentType
Since:
DOM Level 2

getSystemId

public String getSystemId()
The system identifier of the external subset.

Specified by:
getSystemId in interface DocumentType
Since:
DOM Level 2

getInternalSubset

public String getInternalSubset()
The internal subset as a string.The actual content returned depends on how much information is available to the implementation. This may vary depending on various parameters, including the XML processor used to build the document.

Specified by:
getInternalSubset in interface DocumentType
Since:
DOM Level 2

setInternalSubset

public void setInternalSubset(String internalSubset)
Set the internal subset non-DOM