⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iiometadatanode.java

📁 gcc的组建
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
  {    return (Attr)attrs.put(newAttr.getName(), newAttr);  }    /* (non-Javadoc)   * @see org.w3c.dom.Element#setAttributeNS(java.lang.String, java.lang.String, java.lang.String)   */  public void setAttributeNS(String namespaceURI, String qualifiedName, String value)  {    setAttribute(qualifiedName, value);      }    /* (non-Javadoc)   * @see org.w3c.dom.NodeList#getLength()   */  public int getLength()  {    return children.size();  }    /* (non-Javadoc)   * @see org.w3c.dom.NodeList#item(int)   */  public Node item(int index)  {    if (index < children.size())      return (Node)children.get(index);    else      return null;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node)   */  public Node appendChild(Node newChild)  {    if (newChild == null)      throw new IllegalArgumentException("Child node is null");        IIOMetadataNode child = (IIOMetadataNode) newChild;        children.add(child);    child.parent = this;    return this;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#cloneNode(boolean)   */  public Node cloneNode(boolean deep)  {    IIOMetadataNode newnode = new IIOMetadataNode(name);    newnode.parent = null;    newnode.obj = obj;    if (deep)    {      for (int i=0; i < children.size(); i++)        newnode.children.add(((Node)children.get(i)).cloneNode(deep));    }        // clone attrs    for (Iterator it = attrs.values().iterator(); it.hasNext();)    {      IIOMetadataNodeAttr attr = (IIOMetadataNodeAttr)it.next();      newnode.attrs.put(attr.name, attr.cloneNode(deep));      attr.owner = newnode;    }    return newnode;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getAttributes()   */  public NamedNodeMap getAttributes()  {    return new IIONamedNodeMap(attrs);  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getChildNodes()   */  public NodeList getChildNodes()  {    return this;  }  public Object getFeature(String feature, String version)  {    return null;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getFirstChild()   */  public Node getFirstChild()  {    return (children.size() > 0) ? (Node)children.get(0) : null;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getLastChild()   */  public Node getLastChild()  {    return (children.size() > 0) ? (Node)children.get(children.size() - 1)           : null;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getLocalName()   */  public String getLocalName()  {    return name;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getNamespaceURI()   */  public String getNamespaceURI()  {    return null;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getNextSibling()   */  public Node getNextSibling()  {    // If this op needs to be faster, add links to prev and next nodes.    if (parent == null) return null;    int idx = parent.children.indexOf(this);    return (idx == parent.children.size() - 1) ? null        : (Node)parent.children.get(idx + 1);  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getNodeName()   */  public String getNodeName()  {    return name;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getNodeType()   */  public short getNodeType()  {    return ELEMENT_NODE;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getNodeValue()   */  public String getNodeValue()  {    return null;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getOwnerDocument()   */  public Document getOwnerDocument()  {    // IOMetadataNodes have no owner    return null;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#getParentNode()   */  public Node getParentNode()  {    return parent;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getPrefix()   */  public String getPrefix()  {    return null;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#getPreviousSibling()   */  public Node getPreviousSibling()  {    // If this op needs to be faster, add links to prev and next nodes.    if (parent == null) return null;    int idx = parent.children.indexOf(this);    return (idx == 0) ? null        : (Node)parent.children.get(idx - 1);  }  public TypeInfo getSchemaTypeInfo()  {    return null;  }  public String getTextContent()    throws DOMException  {    return null;  }  public Object getUserData(String key)  {    return null;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#hasAttributes()   */  public boolean hasAttributes()  {    return !attrs.isEmpty();  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#hasChildNodes()   */  public boolean hasChildNodes()  {    return !children.isEmpty();  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)   */  public Node insertBefore(Node newChild, Node refChild)  {    if (newChild == null)      throw new IllegalArgumentException();        int idx = children.indexOf(refChild);    if (idx == -1)      children.add(newChild);    else      children.add(idx, newChild);    ((IIOMetadataNode)newChild).parent = this;        return newChild;  }  public boolean isDefaultNamespace(String namespaceURI)  {    return true;  }  public boolean isEqualNode(Node arg)  {    return true;  }    public boolean isSameNode(Node other)  {    return this == other;  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#isSupported(java.lang.String, java.lang.String)   */  public boolean isSupported(String feature, String version)  {    // No DOM features are supported    return false;  }    public String lookupNamespaceURI(String prefix)  {    return null;  }    public String lookupPrefix(String namespaceURI)  {    return null;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#normalize()   */  public void normalize()  {    // No text nodes so no action  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#removeChild(org.w3c.dom.Node)   */  public Node removeChild(Node oldChild)  {    if (oldChild == null)      throw new IllegalArgumentException();    children.remove(oldChild);    ((IIOMetadataNode)oldChild).parent = null;    return oldChild;  }  /* (non-Javadoc)   * @see org.w3c.dom.Node#replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)   */  public Node replaceChild(Node newChild, Node oldChild)  {    if (newChild == null)      throw new IllegalArgumentException();    children.set(children.indexOf(oldChild), newChild);    ((IIOMetadataNode)oldChild).parent = null;    return oldChild;  }    public void setIdAttribute(String name, boolean isId)    throws DOMException  {  }  public void setIdAttributeNode(Attr idAttr, boolean isId)    throws DOMException  {  }  public void setIdAttributeNS(String namespaceURI, String localName, boolean isId)    throws DOMException  {  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#setNodeValue(java.lang.String)   */  public void setNodeValue(String nodeValue) throws DOMException  {  }    /* (non-Javadoc)   * @see org.w3c.dom.Node#setPrefix(java.lang.String)   */  public void setPrefix(String prefix)  {  }  public void setTextContent(String textContent)    throws DOMException  {  }    public Object setUserData(String key, Object data, UserDataHandler handler)  {    return null;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -