]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - libjava/org/w3c/dom/Node.java
Imported gcc-4.4.3
[msp430-gcc.git] / libjava / org / w3c / dom / Node.java
diff --git a/libjava/org/w3c/dom/Node.java b/libjava/org/w3c/dom/Node.java
deleted file mode 100644 (file)
index ef650a2..0000000
+++ /dev/null
@@ -1,390 +0,0 @@
-/*\r
- * Copyright (c) 2000 World Wide Web Consortium,\r
- * (Massachusetts Institute of Technology, Institut National de\r
- * Recherche en Informatique et en Automatique, Keio University). All\r
- * Rights Reserved. This program is distributed under the W3C's Software\r
- * Intellectual Property License. This program is distributed in the\r
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even\r
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
- * PURPOSE.\r
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.\r
- */\r
-\r
-package org.w3c.dom;\r
-\r
-/**\r
- * The <code>Node</code> interface is the primary datatype for the entire \r
- * Document Object Model. It represents a single node in the document tree. \r
- * While all objects implementing the <code>Node</code> interface expose \r
- * methods for dealing with children, not all objects implementing the \r
- * <code>Node</code> interface may have children. For example, \r
- * <code>Text</code> nodes may not have children, and adding children to \r
- * such nodes results in a <code>DOMException</code> being raised.\r
- * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and \r
- * <code>attributes</code> are included as a mechanism to get at node \r
- * information without casting down to the specific derived interface. In \r
- * cases where there is no obvious mapping of these attributes for a \r
- * specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an \r
- * <code>Element</code> or <code>attributes</code> for a <code>Comment</code>\r
- * ), this returns <code>null</code>. Note that the specialized interfaces \r
- * may contain additional and more convenient mechanisms to get and set the \r
- * relevant information.\r
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.\r
- */\r
-public interface Node {\r
-    // NodeType\r
-    /**\r
-     * The node is an <code>Element</code>.\r
-     */\r
-    public static final short ELEMENT_NODE              = 1;\r
-    /**\r
-     * The node is an <code>Attr</code>.\r
-     */\r
-    public static final short ATTRIBUTE_NODE            = 2;\r
-    /**\r
-     * The node is a <code>Text</code> node.\r
-     */\r
-    public static final short TEXT_NODE                 = 3;\r
-    /**\r
-     * The node is a <code>CDATASection</code>.\r
-     */\r
-    public static final short CDATA_SECTION_NODE        = 4;\r
-    /**\r
-     * The node is an <code>EntityReference</code>.\r
-     */\r
-    public static final short ENTITY_REFERENCE_NODE     = 5;\r
-    /**\r
-     * The node is an <code>Entity</code>.\r
-     */\r
-    public static final short ENTITY_NODE               = 6;\r
-    /**\r
-     * The node is a <code>ProcessingInstruction</code>.\r
-     */\r
-    public static final short PROCESSING_INSTRUCTION_NODE = 7;\r
-    /**\r
-     * The node is a <code>Comment</code>.\r
-     */\r
-    public static final short COMMENT_NODE              = 8;\r
-    /**\r
-     * The node is a <code>Document</code>.\r
-     */\r
-    public static final short DOCUMENT_NODE             = 9;\r
-    /**\r
-     * The node is a <code>DocumentType</code>.\r
-     */\r
-    public static final short DOCUMENT_TYPE_NODE        = 10;\r
-    /**\r
-     * The node is a <code>DocumentFragment</code>.\r
-     */\r
-    public static final short DOCUMENT_FRAGMENT_NODE    = 11;\r
-    /**\r
-     * The node is a <code>Notation</code>.\r
-     */\r
-    public static final short NOTATION_NODE             = 12;\r
-\r
-    /**\r
-     * The name of this node, depending on its type; see the table above. \r
-     */\r
-    public String getNodeName();\r
-\r
-    /**\r
-     * The value of this node, depending on its type; see the table above. \r
-     * When it is defined to be <code>null</code>, setting it has no effect.\r
-     * @exception DOMException\r
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.\r
-     * @exception DOMException\r
-     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than \r
-     *   fit in a <code>DOMString</code> variable on the implementation \r
-     *   platform.\r
-     */\r
-    public String getNodeValue()\r
-                                 throws DOMException;\r
-    public void setNodeValue(String nodeValue)\r
-                                 throws DOMException;\r
-\r
-    /**\r
-     * A code representing the type of the underlying object, as defined above.\r
-     */\r
-    public short getNodeType();\r
-\r
-    /**\r
-     * The parent of this node. All nodes, except <code>Attr</code>, \r
-     * <code>Document</code>, <code>DocumentFragment</code>, \r
-     * <code>Entity</code>, and <code>Notation</code> may have a parent. \r
-     * However, if a node has just been created and not yet added to the \r
-     * tree, or if it has been removed from the tree, this is \r
-     * <code>null</code>.\r
-     */\r
-    public Node getParentNode();\r
-\r
-    /**\r
-     * A <code>NodeList</code> that contains all children of this node. If \r
-     * there are no children, this is a <code>NodeList</code> containing no \r
-     * nodes.\r
-     */\r
-    public NodeList getChildNodes();\r
-\r
-    /**\r
-     * The first child of this node. If there is no such node, this returns \r
-     * <code>null</code>.\r
-     */\r
-    public Node getFirstChild();\r
-\r
-    /**\r
-     * The last child of this node. If there is no such node, this returns \r
-     * <code>null</code>.\r
-     */\r
-    public Node getLastChild();\r
-\r
-    /**\r
-     * The node immediately preceding this node. If there is no such node, \r
-     * this returns <code>null</code>.\r
-     */\r
-    public Node getPreviousSibling();\r
-\r
-    /**\r
-     * The node immediately following this node. If there is no such node, \r
-     * this returns <code>null</code>.\r
-     */\r
-    public Node getNextSibling();\r
-\r
-    /**\r
-     * A <code>NamedNodeMap</code> containing the attributes of this node (if \r
-     * it is an <code>Element</code>) or <code>null</code> otherwise. \r
-     */\r
-    public NamedNodeMap getAttributes();\r
-\r
-    /**\r
-     * The <code>Document</code> object associated with this node. This is \r
-     * also the <code>Document</code> object used to create new nodes. When \r
-     * this node is a <code>Document</code> or a <code>DocumentType</code> \r
-     * which is not used with any <code>Document</code> yet, this is \r
-     * <code>null</code>.\r
-     * @version DOM Level 2\r
-     */\r
-    public Document getOwnerDocument();\r
-\r
-    /**\r
-     * Inserts the node <code>newChild</code> before the existing child node \r
-     * <code>refChild</code>. If <code>refChild</code> is <code>null</code>, \r
-     * insert <code>newChild</code> at the end of the list of children.\r
-     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, \r
-     * all of its children are inserted, in the same order, before \r
-     * <code>refChild</code>. If the <code>newChild</code> is already in the \r
-     * tree, it is first removed.\r
-     * @param newChildThe node to insert.\r
-     * @param refChildThe reference node, i.e., the node before which the new \r
-     *   node must be inserted.\r
-     * @return The node being inserted.\r
-     * @exception DOMException\r
-     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not \r
-     *   allow children of the type of the <code>newChild</code> node, or if \r
-     *   the node to insert is one of this node's ancestors.\r
-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created \r
-     *   from a different document than the one that created this node.\r
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or \r
-     *   if the parent of the node being inserted is readonly.\r
-     *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of \r
-     *   this node.\r
-     */\r
-    public Node insertBefore(Node newChild, \r
-                             Node refChild)\r
-                             throws DOMException;\r
-\r
-    /**\r
-     * Replaces the child node <code>oldChild</code> with <code>newChild</code>\r
-     *  in the list of children, and returns the <code>oldChild</code> node.\r
-     * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, \r
-     * <code>oldChild</code> is replaced by all of the \r
-     * <code>DocumentFragment</code> children, which are inserted in the \r
-     * same order. If the <code>newChild</code> is already in the tree, it \r
-     * is first removed.\r
-     * @param newChildThe new node to put in the child list.\r
-     * @param oldChildThe node being replaced in the list.\r
-     * @return The node replaced.\r
-     * @exception DOMException\r
-     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not \r
-     *   allow children of the type of the <code>newChild</code> node, or if \r
-     *   the node to put in is one of this node's ancestors.\r
-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created \r
-     *   from a different document than the one that created this node.\r
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of \r
-     *   the new node is readonly.\r
-     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of \r
-     *   this node.\r
-     */\r
-    public Node replaceChild(Node newChild, \r
-                             Node oldChild)\r
-                             throws DOMException;\r
-\r
-    /**\r
-     * Removes the child node indicated by <code>oldChild</code> from the list \r
-     * of children, and returns it.\r
-     * @param oldChildThe node being removed.\r
-     * @return The node removed.\r
-     * @exception DOMException\r
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.\r
-     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of \r
-     *   this node.\r
-     */\r
-    public Node removeChild(Node oldChild)\r
-                            throws DOMException;\r
-\r
-    /**\r
-     * Adds the node <code>newChild</code> to the end of the list of children \r
-     * of this node. If the <code>newChild</code> is already in the tree, it \r
-     * is first removed.\r
-     * @param newChildThe node to add.If it is a <code>DocumentFragment</code>\r
-     *    object, the entire contents of the document fragment are moved \r
-     *   into the child list of this node\r
-     * @return The node added.\r
-     * @exception DOMException\r
-     *   HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not \r
-     *   allow children of the type of the <code>newChild</code> node, or if \r
-     *   the node to append is one of this node's ancestors.\r
-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created \r
-     *   from a different document than the one that created this node.\r
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.\r
-     */\r
-    public Node appendChild(Node newChild)\r
-                            throws DOMException;\r
-\r
-    /**\r
-     * Returns whether this node has any children.\r
-     * @return  <code>true</code> if this node has any children, \r
-     *   <code>false</code> otherwise.\r
-     */\r
-    public boolean hasChildNodes();\r
-\r
-    /**\r
-     * Returns a duplicate of this node, i.e., serves as a generic copy \r
-     * constructor for nodes. The duplicate node has no parent; (\r
-     * <code>parentNode</code> is <code>null</code>.).\r
-     * <br>Cloning an <code>Element</code> copies all attributes and their \r
-     * values, including those generated by the XML processor to represent \r
-     * defaulted attributes, but this method does not copy any text it \r
-     * contains unless it is a deep clone, since the text is contained in a \r
-     * child <code>Text</code> node. Cloning an <code>Attribute</code> \r
-     * directly, as opposed to be cloned as part of an <code>Element</code> \r
-     * cloning operation, returns a specified attribute (\r
-     * <code>specified</code> is <code>true</code>). Cloning any other type \r
-     * of node simply returns a copy of this node.\r
-     * <br>Note that cloning an immutable subtree results in a mutable copy, \r
-     * but the children of an <code>EntityReference</code> clone are readonly\r
-     * . In addition, clones of unspecified <code>Attr</code> nodes are \r
-     * specified. And, cloning <code>Document</code>, \r
-     * <code>DocumentType</code>, <code>Entity</code>, and \r
-     * <code>Notation</code> nodes is implementation dependent.\r
-     * @param deepIf <code>true</code>, recursively clone the subtree under \r
-     *   the specified node; if <code>false</code>, clone only the node \r
-     *   itself (and its attributes, if it is an <code>Element</code>). \r
-     * @return The duplicate node.\r
-     */\r
-    public Node cloneNode(boolean deep);\r
-\r
-    /**\r
-     * Puts all <code>Text</code> nodes in the full depth of the sub-tree \r
-     * underneath this <code>Node</code>, including attribute nodes, into a \r
-     * "normal" form where only structure (e.g., elements, comments, \r
-     * processing instructions, CDATA sections, and entity references) \r
-     * separates <code>Text</code> nodes, i.e., there are neither adjacent \r
-     * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can \r
-     * be used to ensure that the DOM view of a document is the same as if \r
-     * it were saved and re-loaded, and is useful when operations (such as \r
-     * XPointer  lookups) that depend on a particular document tree \r
-     * structure are to be used.In cases where the document contains \r
-     * <code>CDATASections</code>, the normalize operation alone may not be \r
-     * sufficient, since XPointers do not differentiate between \r
-     * <code>Text</code> nodes and <code>CDATASection</code> nodes.\r
-     * @version DOM Level 2\r
-     */\r
-    public void normalize();\r
-\r
-    /**\r
-     * Tests whether the DOM implementation implements a specific feature and \r
-     * that feature is supported by this node.\r
-     * @param featureThe name of the feature to test. This is the same name \r
-     *   which can be passed to the method <code>hasFeature</code> on \r
-     *   <code>DOMImplementation</code>.\r
-     * @param versionThis is the version number of the feature to test. In \r
-     *   Level 2, version 1, this is the string "2.0". If the version is not \r
-     *   specified, supporting any version of the feature will cause the \r
-     *   method to return <code>true</code>.\r
-     * @return Returns <code>true</code> if the specified feature is \r
-     *   supported on this node, <code>false</code> otherwise.\r
-     * @since DOM Level 2\r
-     */\r
-    public boolean isSupported(String feature, \r
-                               String version);\r
-\r
-    /**\r
-     * The namespace URI of this node, or <code>null</code> if it is \r
-     * unspecified.\r
-     * <br>This is not a computed value that is the result of a namespace \r
-     * lookup based on an examination of the namespace declarations in \r
-     * scope. It is merely the namespace URI given at creation time.\r
-     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and \r
-     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 \r
-     * method, such as <code>createElement</code> from the \r
-     * <code>Document</code> interface, this is always <code>null</code>.Per \r
-     * the Namespaces in XML Specification  an attribute does not inherit \r
-     * its namespace from the element it is attached to. If an attribute is \r
-     * not explicitly given a namespace, it simply has no namespace.\r
-     * @since DOM Level 2\r
-     */\r
-    public String getNamespaceURI();\r
-\r
-    /**\r
-     * The namespace prefix of this node, or <code>null</code> if it is \r
-     * unspecified.\r
-     * <br>Note that setting this attribute, when permitted, changes the \r
-     * <code>nodeName</code> attribute, which holds the qualified name, as \r
-     * well as the <code>tagName</code> and <code>name</code> attributes of \r
-     * the <code>Element</code> and <code>Attr</code> interfaces, when \r
-     * applicable.\r
-     * <br>Note also that changing the prefix of an attribute that is known to \r
-     * have a default value, does not make a new attribute with the default \r
-     * value and the original prefix appear, since the \r
-     * <code>namespaceURI</code> and <code>localName</code> do not change.\r
-     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and \r
-     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 \r
-     * method, such as <code>createElement</code> from the \r
-     * <code>Document</code> interface, this is always <code>null</code>.\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified prefix contains an \r
-     *   illegal character.\r
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.\r
-     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is \r
-     *   malformed, if the <code>namespaceURI</code> of this node is \r
-     *   <code>null</code>, if the specified prefix is "xml" and the \r
-     *   <code>namespaceURI</code> of this node is different from "\r
-     *   http://www.w3.org/XML/1998/namespace", if this node is an attribute \r
-     *   and the specified prefix is "xmlns" and the \r
-     *   <code>namespaceURI</code> of this node is different from "\r
-     *   http://www.w3.org/2000/xmlns/", or if this node is an attribute and \r
-     *   the <code>qualifiedName</code> of this node is "xmlns" .\r
-     * @since DOM Level 2\r
-     */\r
-    public String getPrefix();\r
-    public void setPrefix(String prefix)\r
-                               throws DOMException;\r
-\r
-    /**\r
-     * Returns the local part of the qualified name of this node.\r
-     * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and \r
-     * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 \r
-     * method, such as <code>createElement</code> from the \r
-     * <code>Document</code> interface, this is always <code>null</code>.\r
-     * @since DOM Level 2\r
-     */\r
-    public String getLocalName();\r
-\r
-    /**\r
-     * Returns whether this node (if it is an element) has any attributes.\r
-     * @return <code>true</code> if this node has any attributes, \r
-     *   <code>false</code> otherwise.\r
-     * @since DOM Level 2\r
-     */\r
-    public boolean hasAttributes();\r
-\r
-}\r