com.teamkonzept.dom4jb.dom
Class DocumentType

java.lang.Object
  |
  +--com.teamkonzept.dom4jb.dom.NodeList
        |
        +--com.teamkonzept.dom4jb.dom.Node
              |
              +--com.teamkonzept.dom4jb.dom.DocumentType
All Implemented Interfaces:
DocumentType, Node, NodeList

public class DocumentType
extends Node
implements DocumentType

%TODO% ALLES


Field Summary
 
Fields inherited from class com.teamkonzept.dom4jb.dom.Node
document
 
Fields inherited from class com.teamkonzept.dom4jb.dom.NodeList
EMPTY, initialCapacity, nodeData, nodeIterator, parent, size
 
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
DocumentType(Document doc)
          Creates new DocumentType
 
Method Summary
 boolean accept(Filter filter)
           
 NamedNodeMap getEntities()
          A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.
 String getInternalSubset()
          The internal subset as a string, or null if there is none.
 String getLocalName()
          Returns the local part of the qualified name of this node.
 String getName()
          The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
 String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 String getNodeName()
          The name of this node, depending on its type; see the table above.
 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 getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 String getPublicId()
          The public identifier of the external subset.
 String getSystemId()
          The system identifier of the external subset.
 void setPrefix(String prefix)
          The namespace prefix of this node, or null if it is unspecified.
 
Methods inherited from class com.teamkonzept.dom4jb.dom.Node
appendChild, attach, cloneNode, getAttributes, getChildIndex, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue
 
Methods inherited from class com.teamkonzept.dom4jb.dom.NodeList
add, clear, ensureCapacity, get, getLength, getParentNode, isEmpty, item, setIterator, setParentNode, size, trimToSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue
 

Constructor Detail

DocumentType

public DocumentType(Document doc)
Creates new DocumentType

Method Detail

accept

public boolean accept(Filter filter)
Specified by:
accept in class Node

getPublicId

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

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

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 2 does not support editing notations, therefore notations cannot be altered in any way.

Specified by:
getNotations in interface DocumentType

getNodeName

public String getNodeName()
The name of this node, depending on its type; see the table above.

Specified by:
getNodeName in interface Node

getPrefix

public String getPrefix()
The namespace prefix of this node, or null if it is unspecified.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
getPrefix in interface Node
Overrides:
getPrefix in class Node
Since:
DOM Level 2

getNodeType

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

Specified by:
getNodeType in interface Node

getNamespaceURI

public String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified.
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.

Specified by:
getNamespaceURI in interface Node
Overrides:
getNamespaceURI in class Node
Since:
DOM Level 2

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. Parameter entities are not contained. Duplicates are discarded. For example in:
<!DOCTYPE
 ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
 "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
 ]> <ex/>
the interface provides access to foo and the first declaration of bar but not the second declaration of bar or baz. Every node in this map also implements the Entity interface.
The DOM Level 2 does not support editing entities, therefore entities cannot be altered in any way.

Specified by:
getEntities in interface DocumentType

getSystemId

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

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

getLocalName

public String getLocalName()
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
getLocalName in interface Node
Overrides:
getLocalName in class Node
Since:
DOM Level 2

getInternalSubset

public String getInternalSubset()
The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets.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

setPrefix

public void setPrefix(String prefix)
The namespace prefix of this node, or null if it is unspecified.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.

Specified by:
setPrefix in interface Node
Overrides:
setPrefix in class Node
Since:
DOM Level 2


Copyright © 2001-2003 Team-Konzept GmbH & CO KG. All Rights Reserved.