jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java

Print this page

        

@@ -25,10 +25,11 @@
 import java.util.Vector;
 
 import com.sun.org.apache.xml.internal.dtm.DTM;
 import com.sun.org.apache.xml.internal.dtm.DTMDOMException;
 import com.sun.org.apache.xpath.internal.NodeSet;
+import java.util.Objects;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
 import org.w3c.dom.DOMException;

@@ -139,25 +140,25 @@
    *
    * @param node A DTM node proxy reference.
    *
    * @return true if the given node has the same handle as this node.
    */
+  @Override
   public final boolean equals(Object node)
   {
-
-    try
-    {
-
       // DTMNodeProxy dtmp = (DTMNodeProxy)node;
       // return (dtmp.node == this.node);
       // Patch attributed to Gary L Peskin <garyp@firstech.com>
-      return equals((Node) node);
-    }
-    catch (ClassCastException cce)
-    {
-      return false;
+      return node instanceof Node && equals((Node) node);
     }
+
+  @Override
+  public int hashCode() {
+      int hash = 7;
+      hash = 29 * hash + Objects.hashCode(this.dtm);
+      hash = 29 * hash + this.node;
+      return hash;
   }
 
   /**
    * FUTURE DOM: Test node identity, in lieu of Node==Node
    *

@@ -179,10 +180,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final String getNodeName()
   {
     return dtm.getNodeName(node);
   }
 

@@ -197,29 +199,32 @@
    * <p>
    * Note that getNodeName is aliased to getTarget.
    *
    *
    */
+  @Override
   public final String getTarget()
   {
     return dtm.getNodeName(node);
   }  // getTarget():String
 
   /**
    *
    *
    * @see org.w3c.dom.Node as of DOM Level 2
    */
+  @Override
   public final String getLocalName()
   {
     return dtm.getLocalName(node);
   }
 
   /**
    * @return The prefix for this node.
    * @see org.w3c.dom.Node as of DOM Level 2
    */
+  @Override
   public final String getPrefix()
   {
     return dtm.getPrefix(node);
   }
 

@@ -228,20 +233,22 @@
    * @param prefix
    *
    * @throws DOMException
    * @see org.w3c.dom.Node as of DOM Level 2 -- DTMNodeProxy is read-only
    */
+  @Override
   public final void setPrefix(String prefix) throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Node as of DOM Level 2
    */
+  @Override
   public final String getNamespaceURI()
   {
     return dtm.getNamespaceURI(node);
   }
 

@@ -275,10 +282,11 @@
    * @param version
    *
    * @return false
    * @see org.w3c.dom.Node as of DOM Level 2
    */
+  @Override
   public final boolean isSupported(String feature, String version)
   {
     return implementation.hasFeature(feature,version);
     // throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -288,10 +296,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Node
    */
+  @Override
   public final String getNodeValue() throws DOMException
   {
     return dtm.getNodeValue(node);
   }
 

@@ -310,30 +319,33 @@
    * @param nodeValue
    *
    * @throws DOMException
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final void setNodeValue(String nodeValue) throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final short getNodeType()
   {
     return (short) dtm.getNodeType(node);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Node getParentNode()
   {
 
     if (getNodeType() == Node.ATTRIBUTE_NODE)
       return null;

@@ -359,10 +371,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final NodeList getChildNodes()
   {
 
     // Annoyingly, AxisIterators do not currently implement DTMIterator, so
     // we can't just wap DTMNodeList around an Axis.CHILD iterator.

@@ -375,10 +388,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Node getFirstChild()
   {
 
     int newnode = dtm.getFirstChild(node);
 

@@ -388,10 +402,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Node getLastChild()
   {
 
     int newnode = dtm.getLastChild(node);
 

@@ -401,10 +416,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Node getPreviousSibling()
   {
 
     int newnode = dtm.getPreviousSibling(node);
 

@@ -414,10 +430,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Node getNextSibling()
   {
 
     // Attr's Next is defined at DTM level, but not at DOM level.
     if (dtm.getNodeType(node) == Node.ATTRIBUTE_NODE)

@@ -433,10 +450,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final NamedNodeMap getAttributes()
   {
 
     return new DTMNamedNodeMap(dtm, node);
   }

@@ -446,10 +464,11 @@
    *
    *
    * @param name
    *
    */
+  @Override
   public boolean hasAttribute(String name)
   {
     return DTM.NULL != dtm.getAttributeNode(node,null,name);
   }
 

@@ -460,20 +479,22 @@
    * @param namespaceURI
    * @param localName
    *
    *
    */
+  @Override
   public boolean hasAttributeNS(String namespaceURI, String localName)
   {
     return DTM.NULL != dtm.getAttributeNode(node,namespaceURI,localName);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final Document getOwnerDocument()
   {
         // Note that this uses the DOM-compatable version of the call
         return (Document)(dtm.getNode(dtm.getOwnerDocument(node)));
   }

@@ -486,10 +507,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node insertBefore(Node newChild, Node refChild)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }

@@ -502,10 +524,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node replaceChild(Node newChild, Node oldChild)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }

@@ -517,10 +540,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node removeChild(Node oldChild) throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }
 

@@ -531,20 +555,22 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node appendChild(Node newChild) throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Node
    */
+  @Override
   public final boolean hasChildNodes()
   {
     return (DTM.NULL != dtm.getFirstChild(node));
   }
 

@@ -553,30 +579,33 @@
    * @param deep
    *
    *
    * @see org.w3c.dom.Node -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node cloneNode(boolean deep)
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final DocumentType getDoctype()
   {
     return null;
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final DOMImplementation getImplementation()
   {
     return implementation;
   }
 

@@ -585,10 +614,11 @@
    * make it work in the well-formed cases but would that be confusing for others?
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final Element getDocumentElement()
   {
                 int dochandle=dtm.getDocument();
                 int elementhandle=DTM.NULL;
                 for(int kidhandle=dtm.getFirstChild(dochandle);

@@ -632,20 +662,22 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document
    */
+  @Override
   public final Element createElement(String tagName) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final DocumentFragment createDocumentFragment()
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -654,10 +686,11 @@
    * @param data
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final Text createTextNode(String data)
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -666,10 +699,11 @@
    * @param data
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final Comment createComment(String data)
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -680,10 +714,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document
    */
+  @Override
   public final CDATASection createCDATASection(String data)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -696,10 +731,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document
    */
+  @Override
   public final ProcessingInstruction createProcessingInstruction(
                                                                  String target, String data) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -711,10 +747,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document
    */
+  @Override
   public final Attr createAttribute(String name) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -725,10 +762,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document
    */
+  @Override
   public final EntityReference createEntityReference(String name)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -737,10 +775,11 @@
    * @param tagname
    *
    *
    * @see org.w3c.dom.Document
    */
+  @Override
   public final NodeList getElementsByTagName(String tagname)
   {
        Vector listVector = new Vector();
        Node retNode = dtm.getNode(node);
        if (retNode != null)

@@ -817,10 +856,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document as of DOM Level 2 -- DTMNodeProxy is read-only
    */
+  @Override
   public final Node importNode(Node importedNode, boolean deep)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR);
   }

@@ -833,10 +873,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document as of DOM Level 2
    */
+  @Override
   public final Element createElementNS(
                                        String namespaceURI, String qualifiedName) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -849,10 +890,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Document as of DOM Level 2
    */
+  @Override
   public final Attr createAttributeNS(
                                       String namespaceURI, String qualifiedName) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -863,10 +905,11 @@
    * @param localName
    *
    *
    * @see org.w3c.dom.Document as of DOM Level 2
    */
+  @Override
   public final NodeList getElementsByTagNameNS(String namespaceURI,
                                                String localName)
   {
     Vector listVector = new Vector();
     Node retNode = dtm.getNode(node);

@@ -950,10 +993,11 @@
    * @param elementId
    *
    *
    * @see org.w3c.dom.Document as of DOM Level 2
    */
+  @Override
   public final Element getElementById(String elementId)
   {
        return (Element) dtm.getNode(dtm.getElementById(elementId));
   }
 

@@ -964,10 +1008,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Text
    */
+  @Override
   public final Text splitText(int offset) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -976,10 +1021,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final String getData() throws DOMException
   {
     return dtm.getNodeValue(node);
   }
 

@@ -988,20 +1034,22 @@
    * @param data
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final void setData(String data) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final int getLength()
   {
     // %OPT% This should do something smarter?
     return dtm.getNodeValue(node).length();
   }

@@ -1014,10 +1062,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final String substringData(int offset, int count) throws DOMException
   {
     return getData().substring(offset,offset+count);
   }
 

@@ -1026,10 +1075,11 @@
    * @param arg
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final void appendData(String arg) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1039,10 +1089,11 @@
    * @param arg
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final void insertData(int offset, String arg) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1052,10 +1103,11 @@
    * @param count
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final void deleteData(int offset, int count) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1066,10 +1118,11 @@
    * @param arg
    *
    * @throws DOMException
    * @see org.w3c.dom.CharacterData
    */
+  @Override
   public final void replaceData(int offset, int count, String arg)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -1077,10 +1130,11 @@
   /**
    *
    *
    * @see org.w3c.dom.Element
    */
+  @Override
   public final String getTagName()
   {
     return dtm.getNodeName(node);
   }
 

@@ -1089,25 +1143,27 @@
    * @param name
    *
    *
    * @see org.w3c.dom.Element
    */
+  @Override
   public final String getAttribute(String name)
   {
-
     DTMNamedNodeMap  map = new DTMNamedNodeMap(dtm, node);
-    Node node = map.getNamedItem(name);
-    return (null == node) ? EMPTYSTRING : node.getNodeValue();  }
+    Node n = map.getNamedItem(name);
+    return (null == n) ? EMPTYSTRING : n.getNodeValue();
+  }
 
   /**
    *
    * @param name
    * @param value
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final void setAttribute(String name, String value)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -1117,10 +1173,11 @@
    * @param name
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final void removeAttribute(String name) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1129,13 +1186,13 @@
    * @param name
    *
    *
    * @see org.w3c.dom.Element
    */
+  @Override
   public final Attr getAttributeNode(String name)
   {
-
     DTMNamedNodeMap  map = new DTMNamedNodeMap(dtm, node);
     return (Attr)map.getNamedItem(name);
   }
 
   /**

@@ -1145,10 +1202,11 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final Attr setAttributeNode(Attr newAttr) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1159,26 +1217,29 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final Attr removeAttributeNode(Attr oldAttr) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * Introduced in DOM Level 2.
    *
    *
    */
+  @Override
   public boolean hasAttributes()
   {
     return DTM.NULL != dtm.getFirstAttribute(node);
   }
 
   /** @see org.w3c.dom.Element */
+  @Override
   public final void normalize()
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1188,10 +1249,11 @@
    * @param localName
    *
    *
    * @see org.w3c.dom.Element
    */
+  @Override
   public final String getAttributeNS(String namespaceURI, String localName)
   {
     Node retNode = null;
     int n = dtm.getAttributeNode(node,namespaceURI,localName);
     if(n != DTM.NULL)

@@ -1206,10 +1268,11 @@
    * @param value
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final void setAttributeNS(
                                    String namespaceURI, String qualifiedName, String value)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);

@@ -1221,10 +1284,11 @@
    * @param localName
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final void removeAttributeNS(String namespaceURI, String localName)
     throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }

@@ -1235,10 +1299,11 @@
    * @param localName
    *
    *
    * @see org.w3c.dom.Element
    */
+  @Override
   public final Attr getAttributeNodeNS(String namespaceURI, String localName)
   {
        Attr retAttr = null;
        int n = dtm.getAttributeNode(node,namespaceURI,localName);
        if(n != DTM.NULL)

@@ -1254,30 +1319,33 @@
    *
    *
    * @throws DOMException
    * @see org.w3c.dom.Element
    */
+  @Override
   public final Attr setAttributeNodeNS(Attr newAttr) throws DOMException
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Attr
    */
+  @Override
   public final String getName()
   {
     return dtm.getNodeName(node);
   }
 
   /**
    *
    *
    * @see org.w3c.dom.Attr
    */
+  @Override
   public final boolean getSpecified()
   {
     // We really don't know which attributes might have come from the
     // source document versus from the DTD. Treat them all as having
     // been provided by the user.

@@ -1288,20 +1356,22 @@
   /**
    *
    *
    * @see org.w3c.dom.Attr
    */
+  @Override
   public final String getValue()
   {
     return dtm.getNodeValue(node);
   }
 
   /**
    *
    * @param value
    * @see org.w3c.dom.Attr
    */
+  @Override
   public final void setValue(String value)
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1309,10 +1379,11 @@
    * Get the owner element of an attribute.
    *
    *
    * @see org.w3c.dom.Attr as of DOM Level 2
    */
+  @Override
   public final Element getOwnerElement()
   {
     if (getNodeType() != Node.ATTRIBUTE_NODE)
       return null;
     // In XPath and DTM data models, unlike DOM, an Attr's parent is its

@@ -1329,13 +1400,13 @@
    *
    * NEEDSDOC (adoptNode) @return
    *
    * @throws DOMException
    */
+  @Override
   public Node adoptNode(Node source) throws DOMException
   {
-
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * <p>EXPERIMENTAL! Based on the <a

@@ -1346,13 +1417,13 @@
    * of this document. This is <code>null</code> when unspecified.
    * @since DOM Level 3
    *
    * NEEDSDOC ($objectName$) @return
    */
+  @Override
   public String getInputEncoding()
   {
-
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * <p>EXPERIMENTAL! Based on the <a

@@ -1381,11 +1452,10 @@
    *
    * NEEDSDOC ($objectName$) @return
    */
   public boolean getStandalone()
   {
-
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * <p>EXPERIMENTAL! Based on the <a

@@ -1416,13 +1486,13 @@
    * defaults.
    * @since DOM Level 3
    *
    * NEEDSDOC ($objectName$) @return
    */
+  @Override
   public boolean getStrictErrorChecking()
   {
-
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * <p>EXPERIMENTAL! Based on the <a

@@ -1437,10 +1507,11 @@
    * defaults.
    * @since DOM Level 3
    *
    * NEEDSDOC @param strictErrorChecking
    */
+  @Override
   public void setStrictErrorChecking(boolean strictErrorChecking)
   {
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 

@@ -1455,11 +1526,10 @@
    *
    * NEEDSDOC ($objectName$) @return
    */
   public String getVersion()
   {
-
     throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
   }
 
   /**
    * <p>EXPERIMENTAL! Based on the <a

@@ -1480,14 +1550,16 @@
 
   /** Inner class to support getDOMImplementation.
    */
   static class DTMNodeProxyImplementation implements DOMImplementation
   {
+    @Override
     public DocumentType createDocumentType(String qualifiedName,String publicId, String systemId)
     {
       throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
     }
+    @Override
     public Document createDocument(String namespaceURI,String qualfiedName,DocumentType doctype)
     {
       // Could create a DTM... but why, when it'd have to be permanantly empty?
       throw new DTMDOMException(DOMException.NOT_SUPPORTED_ERR);
     }

@@ -1498,10 +1570,11 @@
      * On the other hand, it may be more practically useful to return
      * true and simply treat the whole DOM as read-only, failing on the
      * methods we can't support. I'm not sure which would be more useful
      * to the caller.
      */
+    @Override
     public boolean hasFeature(String feature,String version)
     {
       if( ("CORE".equals(feature.toUpperCase()) || "XML".equals(feature.toUpperCase()))
                                         &&
           ("1.0".equals(version) || "2.0".equals(version)))

@@ -1528,10 +1601,11 @@
      *   primary core <code>Node</code> and not return results inconsistent
      *   with the primary core <code>Node</code> such as attributes,
      *   childNodes, etc.
      * @since DOM Level 3
      */
+    @Override
     public Object getFeature(String feature, String version) {
         // we don't have any alternate node, either this node does the job
         // or we don't have anything that does
         //return hasFeature(feature, version) ? this : null;
         return null; //PENDING

@@ -1540,10 +1614,11 @@
   }
 
 
 //RAMESH : Pending proper implementation of DOM Level 3
 
+    @Override
     public Object setUserData(String key,
                               Object data,
                               UserDataHandler handler) {
         return getOwnerDocument().setUserData( key, data, handler);
     }

@@ -1555,10 +1630,11 @@
      * @param key The key the object is associated to.
      * @return Returns the <code>DOMObject</code> associated to the given key
      *   on this node, or <code>null</code> if there was none.
      * @since DOM Level 3
      */
+    @Override
     public Object getUserData(String key) {
         return getOwnerDocument().getUserData( key);
     }
 
       /**

@@ -1579,10 +1655,11 @@
      *   primary core <code>Node</code> and not return results inconsistent
      *   with the primary core <code>Node</code> such as attributes,
      *   childNodes, etc.
      * @since DOM Level 3
      */
+    @Override
     public Object getFeature(String feature, String version) {
         // we don't have any alternate node, either this node does the job
         // or we don't have anything that does
         return isSupported(feature, version) ? this : null;
     }

@@ -1627,10 +1704,11 @@
      *   attributes, if it is an <code>Element</code>).
      * @return If the nodes, and possibly subtrees are equal,
      *   <code>true</code> otherwise <code>false</code>.
      * @since DOM Level 3
      */
+    @Override
     public boolean isEqualNode(Node arg) {
         if (arg == this) {
             return true;
         }
         if (arg.getNodeType() != getNodeType()) {

@@ -1703,10 +1781,11 @@
      *
      * @param namespaceURI
      * @return th URI for the namespace
      * @since DOM Level 3
      */
+    @Override
     public String lookupNamespaceURI(String specifiedPrefix) {
         short type = this.getNodeType();
         switch (type) {
         case Node.ELEMENT_NODE : {
 

@@ -1795,10 +1874,11 @@
      *  @param namespaceURI The namespace URI to look for.
      *  @return  <code>true</code> if the specified <code>namespaceURI</code>
      *   is the default namespace, <code>false</code> otherwise.
      * @since DOM Level 3
      */
+    @Override
     public boolean isDefaultNamespace(String namespaceURI){
        /*
         // REVISIT: remove casts when DOM L3 becomes REC.
         short type = this.getNodeType();
         switch (type) {

@@ -1869,10 +1949,11 @@
      * Look up the prefix associated to the given namespace URI, starting from this node.
      *
      * @param namespaceURI
      * @return the prefix for the namespace
      */
+    @Override
     public String lookupPrefix(String namespaceURI){
 
         // REVISIT: When Namespaces 1.1 comes out this may not be true
         // Prefix can't be bound to null namespace
         if (namespaceURI == null) {

@@ -1930,10 +2011,11 @@
      * @param other The node to test against.
      * @return Returns <code>true</code> if the nodes are the same,
      *   <code>false</code> otherwise.
      * @since DOM Level 3
      */
+    @Override
     public boolean isSameNode(Node other) {
         // we do not use any wrapper so the answer is obvious
         return this == other;
     }
 

@@ -1980,10 +2062,11 @@
      *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than
      *   fit in a <code>DOMString</code> variable on the implementation
      *   platform.
        * @since DOM Level 3
      */
+    @Override
     public void setTextContent(String textContent)
         throws DOMException {
         setNodeValue(textContent);
     }
     /**

@@ -2029,10 +2112,11 @@
      *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than
      *   fit in a <code>DOMString</code> variable on the implementation
      *   platform.
      * @since DOM Level 3
      */
+    @Override
     public String getTextContent() throws DOMException {
         return getNodeValue();  // overriden in some subclasses
     }
 
      /**

@@ -2041,10 +2125,11 @@
      * @param other The node to compare against this node.
      * @return Returns how the given node is positioned relatively to this
      *   node.
      * @since DOM Level 3
      */
+    @Override
     public short compareDocumentPosition(Node other) throws DOMException {
         return 0;
     }
 
      /**

@@ -2069,18 +2154,20 @@
      * teleconference 30 May 2001).If the base HTML element is not yet
      * attached to a document, does the insert change the Document.baseURI?
      * Yes. (F2F 26 Sep 2001)
      * @since DOM Level 3
      */
+    @Override
     public String getBaseURI() {
         return null;
     }
 
         /**
      * DOM Level 3
      * Renaming node
      */
+    @Override
     public Node renameNode(Node n,
                            String namespaceURI,
                            String name)
                            throws DOMException{
         return n;

@@ -2089,18 +2176,20 @@
 
     /**
      *  DOM Level 3
      *  Normalize document.
      */
+    @Override
     public void normalizeDocument(){
 
     }
     /**
      *  The configuration used when <code>Document.normalizeDocument</code> is
      * invoked.
      * @since DOM Level 3
      */
+    @Override
     public DOMConfiguration getDomConfig(){
        return null;
     }
 
 

@@ -2108,12 +2197,12 @@
     protected String fDocumentURI;
 
     /**
      * DOM Level 3
      */
+    @Override
     public void setDocumentURI(String documentURI){
-
         fDocumentURI= documentURI;
     }
 
         /**
      * DOM Level 3

@@ -2121,10 +2210,11 @@
      * <br>Beware that when the <code>Document</code> supports the feature
      * "HTML" , the href attribute of the HTML BASE element takes precedence
      * over this attribute.
      * @since DOM Level 3
      */
+    @Override
     public String getDocumentURI(){
         return fDocumentURI;
     }
 
         /**DOM Level 3 feature: Document actualEncoding */

@@ -2155,10 +2245,11 @@
     }
 
      /**
     * DOM Level 3
     */
+    @Override
     public Text replaceWholeText(String content)
                                  throws DOMException{
 /*
 
         if (needsSyncData()) {

@@ -2208,10 +2299,11 @@
      * DOM Level 3
      * Returns all text of <code>Text</code> nodes logically-adjacent text
      * nodes to this node, concatenated in document order.
      * @since DOM Level 3
      */
+    @Override
     public String getWholeText(){
 
 /*
         if (needsSyncData()) {
             synchronizeData();

@@ -2233,17 +2325,15 @@
       /**
     * DOM Level 3
      * Returns whether this text node contains whitespace in element content,
      * often abusively called "ignorable whitespace".
      */
+    @Override
     public boolean isElementContentWhitespace(){
         return false;
     }
 
-
-
-
      /**
      * NON-DOM: set the type of this attribute to be ID type.
      *
      * @param id
      */

@@ -2252,66 +2342,74 @@
     }
 
      /**
      * DOM Level 3: register the given attribute node as an ID attribute
      */
+    @Override
     public void setIdAttribute(String name, boolean makeId) {
         //PENDING
     }
 
 
     /**
      * DOM Level 3: register the given attribute node as an ID attribute
      */
+    @Override
     public void setIdAttributeNode(Attr at, boolean makeId) {
         //PENDING
     }
 
     /**
      * DOM Level 3: register the given attribute node as an ID attribute
      */
+    @Override
     public void setIdAttributeNS(String namespaceURI, String localName,
                                     boolean makeId) {
         //PENDING
     }
          /**
          * Method getSchemaTypeInfo.
          * @return TypeInfo
          */
+    @Override
     public TypeInfo getSchemaTypeInfo(){
       return null; //PENDING
     }
 
+    @Override
     public boolean isId() {
         return false; //PENDING
     }
 
 
     private String xmlEncoding;
+    @Override
     public String getXmlEncoding( ) {
         return xmlEncoding;
     }
     public void setXmlEncoding( String xmlEncoding ) {
         this.xmlEncoding = xmlEncoding;
     }
 
     private boolean xmlStandalone;
+    @Override
     public boolean getXmlStandalone() {
         return xmlStandalone;
     }
 
+    @Override
     public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
         this.xmlStandalone = xmlStandalone;
     }
 
     private String xmlVersion;
+    @Override
     public String getXmlVersion() {
         return xmlVersion;
     }
 
+    @Override
     public void setXmlVersion(String xmlVersion) throws DOMException {
         this.xmlVersion = xmlVersion;
     }
 
-
-
 }