Xindice API
version 1.1

org.apache.xindice.xml.dom
Class DocumentTypeImpl

java.lang.Object
  |
  +--org.apache.xindice.xml.dom.NodeImpl
        |
        +--org.apache.xindice.xml.dom.DocumentTypeImpl
All Implemented Interfaces:
CompressedNode, DBNode, org.w3c.dom.DocumentType, org.w3c.dom.Node

public final class DocumentTypeImpl
extends NodeImpl
implements org.w3c.dom.DocumentType

DocumentTypeImpl

Version:
$Revision: 511426 $, $Date: 2007-02-24 22:25:02 -0500 (Sat, 24 Feb 2007) $

Fields inherited from class org.apache.xindice.xml.dom.NodeImpl
data, dirty, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EX_DOMSTRING_SIZE, EX_HIERARCHY_REQUEST, EX_INDEX_SIZE, EX_INUSE_ATTRIBUTE, EX_INVALID_STATE, EX_NO_DATA_ALLOWED, EX_NO_MODIFICATION_ALLOWED, EX_NOT_FOUND, EX_WRONG_DOCUMENT, handlers, key, len, loaded, nodeName, nodeValue, nsURI, OBJECT_HREF, OBJECT_NS, OBJECT_TYPE, ownerDocument, parentNode, pos, source, TYPE_APPEND, TYPE_CONTENT, TYPE_INSERT, TYPE_REPLACE, userData, XMLNS_PREFIX, XMLNS_URI
 
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
DocumentTypeImpl()
           
 
Method Summary
 org.w3c.dom.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.
 org.w3c.dom.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.
 String getTextContent()
          This method returns the text content of this node and its descendants.
 boolean isEqualNode(org.w3c.dom.Node other)
          Tests whether two nodes are equal.
 
Methods inherited from class org.apache.xindice.xml.dom.NodeImpl
appendChild, checkLoaded, checkReadOnly, cloneNode, cloneNode, compareDocumentPosition, expandSource, getAttributes, getBaseURI, getChildNodes, getDataBytes, getDataLen, getDataPos, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getPreviousSibling, getSource, getSymbolID, getUserData, hasAttributes, hasChildNodes, insertBefore, invokeHandlers, invokeHandlers, isDefaultNamespace, isDefined, isDirty, isLoaded, isSameNode, isSupported, load, lookupDefaultNamespaceURI, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setDataBytes, setDataBytes, setDataLen, setDataPos, setDirty, setNodeName, setNodeValue, setParentNode, setPrefix, setSource, setTextContent, setUserData, toString, unload
 
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, cloneNode, 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

public DocumentTypeImpl()
Method Detail

getNodeType

public short getNodeType()
Description copied from class: NodeImpl
A code representing the type of the underlying object, as defined above.
Specified by:
getNodeType in interface org.w3c.dom.Node
Overrides:
getNodeType in class NodeImpl

getName

public String getName()
The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
Specified by:
getName in interface org.w3c.dom.DocumentType

getEntities

public org.w3c.dom.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 org.w3c.dom.DocumentType

getNotations

public org.w3c.dom.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 org.w3c.dom.DocumentType

getPublicId

public String getPublicId()
The public identifier of the external subset.
Specified by:
getPublicId in interface org.w3c.dom.DocumentType
Since:
DOM Level 2

getSystemId

public String getSystemId()
The system identifier of the external subset.
Specified by:
getSystemId in interface org.w3c.dom.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 org.w3c.dom.DocumentType
Since:
DOM Level 2

getTextContent

public String getTextContent()
Description copied from class: NodeImpl
This method returns the text content of this node and its descendants. No serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed and the returned string does not contain the white spaces in element content (see the attribute Text.isElementContentWhitespace).
The string returned is made of the text content of this node depending on its type, as defined below:
Node typeContent
ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children.
TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODEnodeValue
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE null
Overrides:
getTextContent in class NodeImpl
Since:
DOM Level 3

isEqualNode

public boolean isEqualNode(org.w3c.dom.Node other)
Tests whether two nodes are equal. This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested with Node.isSameNode(). All nodes that are the same will also be equal, though the reverse may not be true.
Two nodes are equal if and only if the following conditions are satisfied:
For two DocumentType nodes to be equal, the following conditions must also be satisfied:
On the other hand, the following do not affect equality: the ownerDocument, baseURI, and parentNode attributes, the specified attribute for Attr nodes, the schemaTypeInfo attribute for Attr and Element nodes, the Text.isElementContentWhitespace attribute for Text nodes, as well as any user data or event listeners registered on the nodes.
Overrides:
isEqualNode in class NodeImpl
Parameters:
other - Node to test againts
Returns:
true if nodes are equal, false otherwise
Since:
DOM Level 3

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.