org.apache.batik.dom_1.6.0.v201011041432

ic int getLength()
  {
    return count;
  }
  
  public Node getNamedItemNS(String paramString1, String paramString2)
  {
    return get(paramString1, paramString2);
  }
  
  public Node setNamedItemNS(Node paramNode)
    throws DOMException
  {
    if (paramNode == null) {
      return null;
    }
    String str = paramNode.getNamespaceURI();
    return setNamedItem(str, str == null ? paramNode.getNodeName() : paramNode.getLocalName(), paramNode);
  }
  
  public Node removeNamedItemNS(String paramString1, String paramString2)
    throws DOMException
  {
    if (this$0.isReadonly()) {
      throw this$0.createDOMException((short)7, "readonly.node.map", new Object[0]);
    }
    if (paramString2 == null) {
      throw this$0.createDOMException((short)8, "attribute.missing", new Object[] { "" });
    }
    AbstractAttr localAbstractAttr = (AbstractAttr)remove(paramString1, paramString2);
    if (localAbstractAttr == null) {
      throw this$0.createDOMException((short)8, "attribute.missing", new Object[] { paramString2 });
    }
    localAbstractAttr.setOwnerElement(null);
    this$0.fireDOMAttrModifiedEvent(localAbstractAttr.getNodeName(), localAbstractAttr, localAbstractAttr.getNodeValue(), "", (short)3);
    return localAbstractAttr;
  }
  
  public Node setNamedItem(String paramString1, String paramString2, Node paramNode)
    throws DOMException
  {
    ((AbstractAttr)paramNode).setOwnerElement(this$0);
    AbstractAttr localAbstractAttr = (AbstractAttr)put(paramString1, paramString2, paramNode);
    if (localAbstractAttr != null)
    {
      localAbstractAttr.setOwnerElement(null);
      this$0.fireDOMAttrModifiedEvent(paramString2, localAbstractAttr, localAbstractAttr.getNodeValue(), "", (short)3);
    }
    this$0.fireDOMAttrModifiedEvent(paramString2, (Attr)paramNode, "", paramNode.getNodeValue(), (short)2);
    return localAbstractAttr;
  }
  
  protected void checkNode(Node paramNode)
  {
    if (this$0.isReadonly()) {
      throw this$0.createDOMException((short)7, "readonly.node.map", new Object[0]);
    }
    if (this$0.getOwnerDocument() != paramNode.getOwnerDocument()) {
      throw this$0.createDOMException((short)4, "node.from.wrong.document", new Object[] { new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
    if ((paramNode.getNodeType() == 2) && (((Attr)paramNode).getOwnerElement() != null)) {
      throw this$0.createDOMException((short)4, "inuse.attribute", new Object[] { paramNode.getNodeName() });
    }
  }
  
  protected Node get(String paramString1, String paramString2)
  {
    int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
    int j = i % table.length;
    for (AbstractElement.Entry localEntry = table[j]; localEntry != null; localEntry = next) {
      if ((hash == i) && (localEntry.match(paramString1, paramString2))) {
        return value;
      }
    }
    return null;
  }
  
  protected Node put(String paramString1, String paramString2, Node paramNode)
  {
    int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
    int j = i % table.length;
    for (AbstractElement.Entry localEntry1 = table[j]; localEntry1 != null; localEntry1 = next) {
      if ((hash == i) && (localEntry1.match(paramString1, paramString2)))
      {
        Node localNode = value;
        value = paramNode;
        return localNode;
      }
    }
    int k = table.length;
    if (count++ >= k * 3 >>> 2)
    {
      rehash();
      j = i % table.length;
    }
    AbstractElement.Entry localEntry2 = new AbstractElement.Entry(i, paramString1, paramString2, paramNode, table[j]);
    table[j] = localEntry2;
    return null;
  }
  
  protected Node remove(String paramString1, String paramString2)
  {
    int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
    int j = i % table.length;
    Object localObject = null;
    for (AbstractElement.Entry localEntry = table[j]; localEntry != null; localEntry = next)
    {
      if ((hash == i) && (localEntry.match(paramString1, paramString2)))
      {
        Node localNode = value;
        if (localObject == null) {
          table[j] = next;
        } else {
          next = next;
        }
        count -= 1;
        return localNode;
      }
      localObject = localEntry;
    }
    return null;
  }
  
  protected void rehash()
  {
    AbstractElement.Entry[] arrayOfEntry = table;
    table = new AbstractElement.Entry[arrayOfEntry.length * 2 + 1];
    for (int i = arrayOfEntry.length - 1; i >= 0; i--)
    {
      AbstractElement.Entry localEntry1 = arrayOfEntry[i];
      while (localEntry1 != null)
      {
        AbstractElement.Entry localEntry2 = localEntry1;
        localEntry1 = next;
        int j = hash % table.length;
        next = table[j];
        table[j] = localEntry2;
      }
    }
  }
  
  protected int hashCode(String paramString1, String paramString2)
  {
    int i = paramString1 == null ? 0 : paramString1.hashCode();
    return i ^ paramString2.hashCode();
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractElement.NamedNodeHashMap
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import java.io.Serializable;
import org.apache.batik.dom.util.DOMUtilities;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.events.DocumentEvent;
import org.w3c.dom.events.MutationEvent;

public abstract class AbstractElement
  extends AbstractParentChildNode
  implements Element
{
  protected NamedNodeMap attributes;
  
  protected AbstractElement() {}
  
  protected AbstractElement(String paramString, AbstractDocument paramAbstractDocument)
  {
    ownerDocument = paramAbstractDocument;
    if (!DOMUtilities.isValidName(paramString)) {
      throw createDOMException((short)5, "xml.name", new Object[] { paramString });
    }
  }
  
  public short getNodeType()
  {
    return 1;
  }
  
  public boolean hasAttributes()
  {
    return (attributes != null) && (attributes.getLength() != 0);
  }
  
  public NamedNodeMap getAttributes()
  {
    return attributes == null ? (attributes = createAttributes()) : attributes;
  }
  
  public String getTagName()
  {
    return getNodeName();
  }
  
  public boolean hasAttribute(String paramString)
  {
    return (attributes != null) && (attributes.getNamedItem(paramString) != null);
  }
  
  public String getAttribute(String paramString)
  {
    if (attributes == null) {
      return "";
    }
    Attr localAttr = (Attr)attributes.getNamedItem(paramString);
    return localAttr == null ? "" : localAttr.getValue();
  }
  
  public void setAttribute(String paramString1, String paramString2)
    throws DOMException
  {
    if (attributes == null) {
      attributes = createAttributes();
    }
    Attr localAttr = getAttributeNode(paramString1);
    if (localAttr == null)
    {
      localAttr = getOwnerDocument().createAttribute(paramString1);
      localAttr.setValue(paramString2);
      attributes.setNamedItem(localAttr);
    }
    else
    {
      localAttr.setValue(paramString2);
    }
  }
  
  public void removeAttribute(String paramString)
    throws DOMException
  {
    if (!hasAttribute(paramString)) {
      return;
    }
    attributes.removeNamedItem(paramString);
  }
  
  public Attr getAttributeNode(String paramString)
  {
    if (attributes == null) {
      return null;
    }
    return (Attr)attributes.getNamedItem(paramString);
  }
  
  public Attr setAttributeNode(Attr paramAttr)
    throws DOMException
  {
    if (paramAttr == null) {
      return null;
    }
    if (attributes == null) {
      attributes = createAttributes();
    }
    return (Attr)attributes.setNamedItemNS(paramAttr);
  }
  
  public Attr removeAttributeNode(Attr paramAttr)
    throws DOMException
  {
    if (paramAttr == null) {
      return null;
    }
    if (attributes == null) {
      throw createDOMException((short)8, "attribute.missing", new Object[] { paramAttr.getName() });
    }
    String str = paramAttr.getNamespaceURI();
    return (Attr)attributes.removeNamedItemNS(str, str == null ? paramAttr.getNodeName() : paramAttr.getLocalName());
  }
  
  public void normalize()
  {
    super.normalize();
    if (attributes != null)
    {
      NamedNodeMap localNamedNodeMap = getAttributes();
      for (int i = localNamedNodeMap.getLength() - 1; i >= 0; i--) {
        localNamedNodeMap.item(i).normalize();
      }
    }
  }
  
  public boolean hasAttributeNS(String paramString1, String paramString2)
  {
    return (attributes != null) && (attributes.getNamedItemNS(paramString1, paramString2) != null);
  }
  
  public String getAttributeNS(String paramString1, String paramString2)
  {
    if (attributes == null) {
      return "";
    }
    Attr localAttr = (Attr)attributes.getNamedItemNS(paramString1, paramString2);
    return localAttr == null ? "" : localAttr.getValue();
  }
  
  public void setAttributeNS(String paramString1, String paramString2, String paramString3)
    throws DOMException
  {
    if (attributes == null) {
      attributes = createAttributes();
    }
    Attr localAttr = getAttributeNodeNS(paramString1, paramString2);
    if (localAttr == null)
    {
      localAttr = getOwnerDocument().createAttributeNS(paramString1, paramString2);
      localAttr.setValue(paramString3);
      attributes.setNamedItemNS(localAttr);
    }
    else
    {
      localAttr.setValue(paramString3);
    }
  }
  
  public void removeAttributeNS(String paramString1, String paramString2)
    throws DOMException
  {
    if (!hasAttributeNS(paramString1, paramString2)) {
      return;
    }
    attributes.removeNamedItemNS(paramString1, paramString2);
  }
  
  public Attr getAttributeNodeNS(String paramString1, String paramString2)
  {
    if (attributes == null) {
      return null;
    }
    return (Attr)attributes.getNamedItemNS(paramString1, paramString2);
  }
  
  public Attr setAttributeNodeNS(Attr paramAttr)
    throws DOMException
  {
    if (paramAttr == null) {
      return null;
    }
    if (attributes == null) {
      attributes = createAttributes();
    }
    return (Attr)attributes.setNamedItemNS(paramAttr);
  }
  
  protected void nodeAdded(Node paramNode)
  {
    invalidateElementsByTagName(paramNode);
  }
  
  protected void nodeToBeRemoved(Node paramNode)
  {
    invalidateElementsByTagName(paramNode);
  }
  
  private void invalidateElementsByTagName(Node paramNode)
  {
    if (paramNode.getNodeType() != 1) {
      return;
    }
    AbstractDocument localAbstractDocument = getCurrentDocument();
    String str1 = paramNode.getNamespaceURI();
    String str2 = paramNode.getNodeName();
    String str3 = str1 == null ? paramNode.getNodeName() : paramNode.getLocalName();
    for (Object localObject1 = this; localObject1 != null; localObject1 = ((Node)localObject1).getParentNode()) {
      switch (((Node)localObject1).getNodeType())
      {
      case 1: 
      case 9: 
        localObject2 = localAbstractDocument.getElementsByTagName((Node)localObject1, str2);
        if (localObject2 != null) {
          ((AbstractParentNode.ElementsByTagName)localObject2).invalidate();
        }
        localObject2 = localAbstractDocument.getElementsByTagName((Node)localObject1, "*");
        if (localObject2 != null) {
          ((AbstractParentNode.ElementsByTagName)localObject2).invalidate();
        }
        AbstractParentNode.ElementsByTagNameNS localElementsByTagNameNS = localAbstractDocument.getElementsByTagNameNS((Node)localObject1, str1, str3);
        if (localElementsByTagNameNS != null) {
          localElementsByTagNameNS.invalidate();
        }
        localElementsByTagNameNS = localAbstractDocument.getElementsByTagNameNS((Node)localObject1, "*", str3);
        if (localElementsByTagNameNS != null) {
          localElementsByTagNameNS.invalidate();
        }
        localElementsByTagNameNS = localAbstractDocument.getElementsByTagNameNS((Node)localObject1, str1, "*");
        if (localElementsByTagNameNS != null) {
          localElementsByTagNameNS.invalidate();
        }
        localElementsByTagNameNS = localAbstractDocument.getElementsByTagNameNS((Node)localObject1, "*", "*");
        if (localElementsByTagNameNS != null) {
          localElementsByTagNameNS.invalidate();
        }
        break;
      }
    }
    for (Object localObject2 = paramNode.getFirstChild(); localObject2 != null; localObject2 = ((Node)localObject2).getNextSibling()) {
      invalidateElementsByTagName((Node)localObject2);
    }
  }
  
  protected NamedNodeMap createAttributes()
  {
    return new NamedNodeHashMap();
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractElement localAbstractElement = (AbstractElement)paramNode;
    if (attributes != null)
    {
      NamedNodeMap localNamedNodeMap = attributes;
      for (int i = localNamedNodeMap.getLength() - 1; i >= 0; i--)
      {
        AbstractAttr localAbstractAttr = (AbstractAttr)localNamedNodeMap.item(i);
        if (localAbstractAttr.getSpecified())
        {
          Attr localAttr = (Attr)localAbstractAttr.deepExport(localAbstractAttr.cloneNode(false), paramAbstractDocument);
          if ((localAbstractAttr instanceof AbstractAttrNS)) {
            localAbstractElement.setAttributeNodeNS(localAttr);
          } else {
            localAbstractElement.setAttributeNode(localAttr);
          }
        }
      }
    }
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractElement localAbstractElement = (AbstractElement)paramNode;
    if (attributes != null)
    {
      NamedNodeMap localNamedNodeMap = attributes;
      for (int i = localNamedNodeMap.getLength() - 1; i >= 0; i--)
      {
        AbstractAttr localAbstractAttr = (AbstractAttr)localNamedNodeMap.item(i);
        if (localAbstractAttr.getSpecified())
        {
          Attr localAttr = (Attr)localAbstractAttr.deepExport(localAbstractAttr.cloneNode(false), paramAbstractDocument);
          if ((localAbstractAttr instanceof AbstractAttrNS)) {
            localAbstractElement.setAttributeNodeNS(localAttr);
          } else {
            localAbstractElement.setAttributeNode(localAttr);
          }
        }
      }
    }
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractElement localAbstractElement = (AbstractElement)paramNode;
    if (attributes != null)
    {
      NamedNodeMap localNamedNodeMap = attributes;
      for (int i = localNamedNodeMap.getLength() - 1; i >= 0; i--)
      {
        AbstractAttr localAbstractAttr = (AbstractAttr)localNamedNodeMap.item(i).cloneNode(true);
        if ((localAbstractAttr instanceof AbstractAttrNS)) {
          localAbstractElement.setAttributeNodeNS(localAbstractAttr);
        } else {
          localAbstractElement.setAttributeNode(localAbstractAttr);
        }
      }
    }
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractElement localAbstractElement = (AbstractElement)paramNode;
    if (attributes != null)
    {
      NamedNodeMap localNamedNodeMap = attributes;
      for (int i = localNamedNodeMap.getLength() - 1; i >= 0; i--)
      {
        AbstractAttr localAbstractAttr = (AbstractAttr)localNamedNodeMap.item(i).cloneNode(true);
        if ((localAbstractAttr instanceof AbstractAttrNS)) {
          localAbstractElement.setAttributeNodeNS(localAbstractAttr);
        } else {
          localAbstractElement.setAttributeNode(localAbstractAttr);
        }
      }
    }
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    switch (paramNode.getNodeType())
    {
    case 1: 
    case 3: 
    case 4: 
    case 5: 
    case 7: 
    case 8: 
    case 11: 
      break;
    case 2: 
    case 6: 
    case 9: 
    case 10: 
    default: 
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
  }
  
  public void fireDOMAttrModifiedEvent(String paramString1, Attr paramAttr, String paramString2, String paramString3, short paramShort)
  {
    switch (paramShort)
    {
    case 2: 
      if (((AbstractAttr)paramAttr).isId()) {
        ownerDocument.addIdEntry(this, paramString3);
      }
      attrAdded(paramAttr, paramString3);
      break;
    case 1: 
      if (((AbstractAttr)paramAttr).isId()) {
        ownerDocument.updateIdEntry(this, paramString2, paramString3);
      }
      attrModified(paramAttr, paramString2, paramString3);
      break;
    default: 
      if (((AbstractAttr)paramAttr).isId()) {
        ownerDocument.removeIdEntry(this, paramString2);
      }
      attrRemoved(paramAttr, paramString2);
    }
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if ((localAbstractDocument1.getEventsEnabled()) && (!paramString2.equals(paramString3)))
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMAttrModified", true, false, paramAttr, paramString2, paramString3, paramString1, paramShort);
      dispatchEvent(localMutationEvent);
    }
  }
  
  protected void attrAdded(Attr paramAttr, String paramString) {}
  
  protected void attrModified(Attr paramAttr, String paramString1, String paramString2) {}
  
  protected void attrRemoved(Attr paramAttr, String paramString) {}
  
  protected static class Entry
    implements Serializable
  {
    public int hash;
    public String namespaceURI;
    public String name;
    public Node value;
    public Entry next;
    
    public Entry(int paramInt, String paramString1, String paramString2, Node paramNode, Entry paramEntry)
    {
      hash = paramInt;
      namespaceURI = paramString1;
      name = paramString2;
      value = paramNode;
      next = paramEntry;
    }
    
    public boolean match(String paramString1, String paramString2)
    {
      if (namespaceURI != null)
      {
        if (!namespaceURI.equals(paramString1)) {
          return false;
        }
      }
      else if (paramString1 != null) {
        return false;
      }
      return name.equals(paramString2);
    }
  }
  
  public class NamedNodeHashMap
    implements NamedNodeMap, Serializable
  {
    protected static final int INITIAL_CAPACITY = 3;
    protected AbstractElement.Entry[] table = new AbstractElement.Entry[3];
    protected int count;
    
    public NamedNodeHashMap() {}
    
    public Node getNamedItem(String paramString)
    {
      if (paramString == null) {
        return null;
      }
      return get(null, paramString);
    }
    
    public Node setNamedItem(Node paramNode)
      throws DOMException
    {
      if (paramNode == null) {
        return null;
      }
      checkNode(paramNode);
      return setNamedItem(null, paramNode.getNodeName(), paramNode);
    }
    
    public Node removeNamedItem(String paramString)
      throws DOMException
    {
      return removeNamedItemNS(null, paramString);
    }
    
    public Node item(int paramInt)
    {
      if ((paramInt < 0) || (paramInt >= count)) {
        return null;
      }
      int i = 0;
      for (int j = 0; j < table.length; j++)
      {
        AbstractElement.Entry localEntry = table[j];
        if (localEntry != null) {
          do
          {
            if (i++ == paramInt) {
              return value;
            }
            localEntry = next;
          } while (localEntry != null);
        }
      }
      return null;
    }
    
    public int getLength()
    {
      return count;
    }
    
    public Node getNamedItemNS(String paramString1, String paramString2)
    {
      return get(paramString1, paramString2);
    }
    
    public Node setNamedItemNS(Node paramNode)
      throws DOMException
    {
      if (paramNode == null) {
        return null;
      }
      String str = paramNode.getNamespaceURI();
      return setNamedItem(str, str == null ? paramNode.getNodeName() : paramNode.getLocalName(), paramNode);
    }
    
    public Node removeNamedItemNS(String paramString1, String paramString2)
      throws DOMException
    {
      if (isReadonly()) {
        throw createDOMException((short)7, "readonly.node.map", new Object[0]);
      }
      if (paramString2 == null) {
        throw createDOMException((short)8, "attribute.missing", new Object[] { "" });
      }
      AbstractAttr localAbstractAttr = (AbstractAttr)remove(paramString1, paramString2);
      if (localAbstractAttr == null) {
        throw createDOMException((short)8, "attribute.missing", new Object[] { paramString2 });
      }
      localAbstractAttr.setOwnerElement(null);
      fireDOMAttrModifiedEvent(localAbstractAttr.getNodeName(), localAbstractAttr, localAbstractAttr.getNodeValue(), "", (short)3);
      return localAbstractAttr;
    }
    
    public Node setNamedItem(String paramString1, String paramString2, Node paramNode)
      throws DOMException
    {
      ((AbstractAttr)paramNode).setOwnerElement(AbstractElement.this);
      AbstractAttr localAbstractAttr = (AbstractAttr)put(paramString1, paramString2, paramNode);
      if (localAbstractAttr != null)
      {
        localAbstractAttr.setOwnerElement(null);
        fireDOMAttrModifiedEvent(paramString2, localAbstractAttr, localAbstractAttr.getNodeValue(), "", (short)3);
      }
      fireDOMAttrModifiedEvent(paramString2, (Attr)paramNode, "", paramNode.getNodeValue(), (short)2);
      return localAbstractAttr;
    }
    
    protected void checkNode(Node paramNode)
    {
      if (isReadonly()) {
        throw createDOMException((short)7, "readonly.node.map", new Object[0]);
      }
      if (getOwnerDocument() != paramNode.getOwnerDocument()) {
        throw createDOMException((short)4, "node.from.wrong.document", new Object[] { new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
      }
      if ((paramNode.getNodeType() == 2) && (((Attr)paramNode).getOwnerElement() != null)) {
        throw createDOMException((short)4, "inuse.attribute", new Object[] { paramNode.getNodeName() });
      }
    }
    
    protected Node get(String paramString1, String paramString2)
    {
      int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
      int j = i % table.length;
      for (AbstractElement.Entry localEntry = table[j]; localEntry != null; localEntry = next) {
        if ((hash == i) && (localEntry.match(paramString1, paramString2))) {
          return value;
        }
      }
      return null;
    }
    
    protected Node put(String paramString1, String paramString2, Node paramNode)
    {
      int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
      int j = i % table.length;
      for (AbstractElement.Entry localEntry1 = table[j]; localEntry1 != null; localEntry1 = next) {
        if ((hash == i) && (localEntry1.match(paramString1, paramString2)))
        {
          Node localNode = value;
          value = paramNode;
          return localNode;
        }
      }
      int k = table.length;
      if (count++ >= k * 3 >>> 2)
      {
        rehash();
        j = i % table.length;
      }
      AbstractElement.Entry localEntry2 = new AbstractElement.Entry(i, paramString1, paramString2, paramNode, table[j]);
      table[j] = localEntry2;
      return null;
    }
    
    protected Node remove(String paramString1, String paramString2)
    {
      int i = hashCode(paramString1, paramString2) & 0x7FFFFFFF;
      int j = i % table.length;
      Object localObject = null;
      for (AbstractElement.Entry localEntry = table[j]; localEntry != null; localEntry = next)
      {
        if ((hash == i) && (localEntry.match(paramString1, paramString2)))
        {
          Node localNode = value;
          if (localObject == null) {
            table[j] = next;
          } else {
            next = next;
          }
          count -= 1;
          return localNode;
        }
        localObject = localEntry;
      }
      return null;
    }
    
    protected void rehash()
    {
      AbstractElement.Entry[] arrayOfEntry = table;
      table = new AbstractElement.Entry[arrayOfEntry.length * 2 + 1];
      for (int i = arrayOfEntry.length - 1; i >= 0; i--)
      {
        AbstractElement.Entry localEntry1 = arrayOfEntry[i];
        while (localEntry1 != null)
        {
          AbstractElement.Entry localEntry2 = localEntry1;
          localEntry1 = next;
          int j = hash % table.length;
          next = table[j];
          table[j] = localEntry2;
        }
      }
    }
    
    protected int hashCode(String paramString1, String paramString2)
    {
      int i = paramString1 == null ? 0 : paramString1.hashCode();
      return i ^ paramString2.hashCode();
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractElement
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import org.apache.batik.dom.util.DOMUtilities;
import org.w3c.dom.DOMException;
import org.w3c.dom.Node;

public abstract class AbstractElementNS
  extends AbstractElement
{
  protected String namespaceURI;
  
  protected AbstractElementNS() {}
  
  protected AbstractElementNS(String paramString1, String paramString2, AbstractDocument paramAbstractDocument)
    throws DOMException
  {
    super(paramString2, paramAbstractDocument);
    namespaceURI = paramString1;
    String str = DOMUtilities.getPrefix(paramString2);
    if ((str != null) && ((paramString1 == null) || (paramString1.equals("")) || (("xml".equals(str)) && (!"http://www.w3.org/XML/1998/namespace".equals(paramString1))))) {
      throw createDOMException((short)14, "namespace.uri", new Object[] { new Integer(getNodeType()), getNodeName(), paramString1 });
    }
  }
  
  public String getNamespaceURI()
  {
    return namespaceURI;
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractElementNS localAbstractElementNS = (AbstractElementNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractElementNS localAbstractElementNS = (AbstractElementNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractElementNS localAbstractElementNS = (AbstractElementNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractElementNS localAbstractElementNS = (AbstractElementNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractElementNS
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import org.w3c.dom.Entity;
import org.w3c.dom.Node;

public abstract class AbstractEntity
  extends AbstractParentNode
  implements Entity
{
  protected String nodeName;
  protected String publicId;
  protected String systemId;
  
  public short getNodeType()
  {
    return 6;
  }
  
  public void setNodeName(String paramString)
  {
    nodeName = paramString;
  }
  
  public String getNodeName()
  {
    return nodeName;
  }
  
  public String getPublicId()
  {
    return publicId;
  }
  
  public void setPublicId(String paramString)
  {
    publicId = paramString;
  }
  
  public String getSystemId()
  {
    return systemId;
  }
  
  public void setSystemId(String paramString)
  {
    systemId = paramString;
  }
  
  public String getNotationName()
  {
    return getNodeName();
  }
  
  public void setNotationName(String paramString)
  {
    setNodeName(paramString);
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractEntity localAbstractEntity = (AbstractEntity)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractEntity localAbstractEntity = (AbstractEntity)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractEntity localAbstractEntity = (AbstractEntity)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractEntity localAbstractEntity = (AbstractEntity)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    switch (paramNode.getNodeType())
    {
    case 1: 
    case 3: 
    case 4: 
    case 5: 
    case 7: 
    case 8: 
    case 11: 
      break;
    case 2: 
    case 6: 
    case 9: 
    case 10: 
    default: 
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractEntity
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import org.apache.batik.dom.util.DOMUtilities;
import org.w3c.dom.DOMException;
import org.w3c.dom.EntityReference;
import org.w3c.dom.Node;

public abstract class AbstractEntityReference
  extends AbstractParentChildNode
  implements EntityReference
{
  protected String nodeName;
  
  protected AbstractEntityReference() {}
  
  protected AbstractEntityReference(String paramString, AbstractDocument paramAbstractDocument)
    throws DOMException
  {
    ownerDocument = paramAbstractDocument;
    if (!DOMUtilities.isValidName(paramString)) {
      throw createDOMException((short)5, "xml.name", new Object[] { paramString });
    }
    nodeName = paramString;
  }
  
  public short getNodeType()
  {
    return 5;
  }
  
  public void setNodeName(String paramString)
  {
    nodeName = paramString;
  }
  
  public String getNodeName()
  {
    return nodeName;
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractEntityReference localAbstractEntityReference = (AbstractEntityReference)paramNode;
    nodeName = nodeName;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractEntityReference localAbstractEntityReference = (AbstractEntityReference)paramNode;
    nodeName = nodeName;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractEntityReference localAbstractEntityReference = (AbstractEntityReference)paramNode;
    nodeName = nodeName;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractEntityReference localAbstractEntityReference = (AbstractEntityReference)paramNode;
    nodeName = nodeName;
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    switch (paramNode.getNodeType())
    {
    case 1: 
    case 3: 
    case 4: 
    case 5: 
    case 7: 
    case 8: 
    case 11: 
      break;
    case 2: 
    case 6: 
    case 9: 
    case 10: 
    default: 
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractEntityReference
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

class AbstractNode$1
  implements NodeList
{
  public Node item(int paramInt)
  {
    return null;
  }
  
  public int getLength()
  {
    return 0;
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractNode.1
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import java.io.Serializable;
import org.apache.batik.dom.events.EventSupport;
import org.apache.batik.dom.events.NodeEventTarget;
import org.apache.batik.dom.util.DOMUtilities;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.events.DocumentEvent;
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventException;
import org.w3c.dom.events.EventListener;
import org.w3c.dom.events.MutationEvent;

public abstract class AbstractNode
  implements ExtendedNode, Serializable
{
  protected static final NodeList EMPTY_NODE_LIST = new NodeList()
  {
    public Node item(int paramAnonymousInt)
    {
      return null;
    }
    
    public int getLength()
    {
      return 0;
    }
  };
  protected AbstractDocument ownerDocument;
  protected transient EventSupport eventSupport;
  
  public void setNodeName(String paramString) {}
  
  public void setOwnerDocument(Document paramDocument)
  {
    ownerDocument = ((AbstractDocument)paramDocument);
  }
  
  public void setSpecified(boolean paramBoolean)
  {
    throw createDOMException((short)11, "node.type", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public String getNodeValue()
    throws DOMException
  {
    return null;
  }
  
  public void setNodeValue(String paramString)
    throws DOMException
  {}
  
  public Node getParentNode()
  {
    return null;
  }
  
  public void setParentNode(Node paramNode)
  {
    throw createDOMException((short)3, "parent.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public NodeList getChildNodes()
  {
    return EMPTY_NODE_LIST;
  }
  
  public Node getFirstChild()
  {
    return null;
  }
  
  public Node getLastChild()
  {
    return null;
  }
  
  public void setPreviousSibling(Node paramNode)
  {
    throw createDOMException((short)3, "sibling.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public Node getPreviousSibling()
  {
    return null;
  }
  
  public void setNextSibling(Node paramNode)
  {
    throw createDOMException((short)3, "sibling.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public Node getNextSibling()
  {
    return null;
  }
  
  public boolean hasAttributes()
  {
    return false;
  }
  
  public NamedNodeMap getAttributes()
  {
    return null;
  }
  
  public Document getOwnerDocument()
  {
    return ownerDocument;
  }
  
  public String getNamespaceURI()
  {
    return null;
  }
  
  public Node insertBefore(Node paramNode1, Node paramNode2)
    throws DOMException
  {
    throw createDOMException((short)3, "children.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public Node replaceChild(Node paramNode1, Node paramNode2)
    throws DOMException
  {
    throw createDOMException((short)3, "children.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public Node removeChild(Node paramNode)
    throws DOMException
  {
    throw createDOMException((short)3, "children.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public Node appendChild(Node paramNode)
    throws DOMException
  {
    throw createDOMException((short)3, "children.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public boolean hasChildNodes()
  {
    return false;
  }
  
  public Node cloneNode(boolean paramBoolean)
  {
    return paramBoolean ? deepCopyInto(newNode()) : copyInto(newNode());
  }
  
  public void normalize() {}
  
  public boolean isSupported(String paramString1, String paramString2)
  {
    return getCurrentDocument().getImplementation().hasFeature(paramString1, paramString2);
  }
  
  public String getPrefix()
  {
    return getNamespaceURI() == null ? null : DOMUtilities.getPrefix(getNodeName());
  }
  
  public void setPrefix(String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    String str1 = getNamespaceURI();
    if (str1 == null) {
      throw createDOMException((short)14, "namespace", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    String str2 = getLocalName();
    if (paramString == null) {
      setNodeName(str2);
    }
    if ((!paramString.equals("")) && (!DOMUtilities.isValidName(paramString))) {
      throw createDOMException((short)5, "prefix", new Object[] { new Integer(getNodeType()), getNodeName(), paramString });
    }
    if (!DOMUtilities.isValidPrefix(paramString)) {
      throw createDOMException((short)14, "prefix", new Object[] { new Integer(getNodeType()), getNodeName(), paramString });
    }
    if (((paramString.equals("xml")) && (!"http://www.w3.org/XML/1998/namespace".equals(str1))) || ((paramString.equals("xmlns")) && (!"http://www.w3.org/2000/xmlns/".equals(str1)))) {
      throw createDOMException((short)14, "namespace.uri", new Object[] { new Integer(getNodeType()), getNodeName(), str1 });
    }
    setNodeName(paramString + ":" + str2);
  }
  
  public String getLocalName()
  {
    return getNamespaceURI() == null ? null : DOMUtilities.getLocalName(getNodeName());
  }
  
  public DOMException createDOMException(short paramShort, String paramString, Object[] paramArrayOfObject)
  {
    try
    {
      return new DOMException(paramShort, getCurrentDocument().formatMessage(paramString, paramArrayOfObject));
    }
    catch (Exception localException) {}
    return new DOMException(paramShort, paramString);
  }
  
  public void addEventListener(String paramString, EventListener paramEventListener, boolean paramBoolean)
  {
    if (eventSupport == null)
    {
      eventSupport = new EventSupport();
      AbstractDocument localAbstractDocument = getCurrentDocument();
      localAbstractDocument.setEventsEnabled(true);
    }
    eventSupport.addEventListener(paramString, paramEventListener, paramBoolean);
  }
  
  public void removeEventListener(String paramString, EventListener paramEventListener, boolean paramBoolean)
  {
    if (eventSupport != null) {
      eventSupport.removeEventListener(paramString, paramEventListener, paramBoolean);
    }
  }
  
  public NodeEventTarget getParentNodeEventTarget()
  {
    return (NodeEventTarget)getParentNode();
  }
  
  public boolean dispatchEvent(Event paramEvent)
    throws EventException
  {
    return EventSupport.dispatchEvent(this, paramEvent);
  }
  
  public EventSupport getEventSupport()
  {
    return eventSupport;
  }
  
  public void fireDOMNodeInsertedIntoDocumentEvent()
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (M
1 2 3 4 5 6 7

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd