org.apache.batik.dom_1.6.0.v201011041432

utationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMNodeInsertedIntoDocument", true, false, null, null, null, null, (short)2);
      dispatchEvent(localMutationEvent);
    }
  }
  
  public void fireDOMNodeRemovedFromDocumentEvent()
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMNodeRemovedFromDocument", true, false, null, null, null, null, (short)3);
      dispatchEvent(localMutationEvent);
    }
  }
  
  protected void fireDOMCharacterDataModifiedEvent(String paramString1, String paramString2)
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMCharacterDataModified", true, false, null, paramString1, paramString2, null, (short)1);
      dispatchEvent(localMutationEvent);
    }
  }
  
  protected AbstractDocument getCurrentDocument()
  {
    return ownerDocument;
  }
  
  protected abstract Node newNode();
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    AbstractNode localAbstractNode = (AbstractNode)paramNode;
    ownerDocument = paramAbstractDocument;
    localAbstractNode.setReadonly(false);
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    AbstractNode localAbstractNode = (AbstractNode)paramNode;
    ownerDocument = paramAbstractDocument;
    localAbstractNode.setReadonly(false);
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    AbstractNode localAbstractNode = (AbstractNode)paramNode;
    ownerDocument = ownerDocument;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    AbstractNode localAbstractNode = (AbstractNode)paramNode;
    ownerDocument = ownerDocument;
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    throw createDOMException((short)3, "children.not.allowed", new Object[] { new Integer(getNodeType()), getNodeName() });
  }
  
  public abstract void setReadonly(boolean paramBoolean);
  
  public abstract boolean isReadonly();
  
  public abstract short getNodeType();
  
  public abstract String getNodeName();
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractNode
 * 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.Notation;

public abstract class AbstractNotation
  extends AbstractNode
  implements Notation
{
  protected String nodeName;
  protected String publicId;
  protected String systemId;
  
  public short getNodeType()
  {
    return 12;
  }
  
  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;
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractNotation localAbstractNotation = (AbstractNotation)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractNotation localAbstractNotation = (AbstractNotation)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractNotation localAbstractNotation = (AbstractNotation)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractNotation localAbstractNotation = (AbstractNotation)paramNode;
    nodeName = nodeName;
    publicId = publicId;
    systemId = systemId;
    return paramNode;
  }
}

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

import org.w3c.dom.Node;

public abstract class AbstractParentChildNode
  extends AbstractParentNode
{
  protected Node parentNode;
  protected Node previousSibling;
  protected Node nextSibling;
  
  public Node getParentNode()
  {
    return parentNode;
  }
  
  public void setParentNode(Node paramNode)
  {
    parentNode = paramNode;
  }
  
  public void setPreviousSibling(Node paramNode)
  {
    previousSibling = paramNode;
  }
  
  public Node getPreviousSibling()
  {
    return previousSibling;
  }
  
  public void setNextSibling(Node paramNode)
  {
    nextSibling = paramNode;
  }
  
  public Node getNextSibling()
  {
    return nextSibling;
  }
}

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

import java.io.Serializable;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class AbstractParentNode$ChildNodes
  implements NodeList, Serializable
{
  protected ExtendedNode firstChild;
  protected ExtendedNode lastChild;
  protected int children;
  private final AbstractParentNode this$0;
  
  public AbstractParentNode$ChildNodes(AbstractParentNode paramAbstractParentNode)
  {
    this$0 = paramAbstractParentNode;
  }
  
  public Node item(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= children)) {
      return null;
    }
    if (paramInt < children >> 1)
    {
      localObject = firstChild;
      for (i = 0; i < paramInt; i++) {
        localObject = ((Node)localObject).getNextSibling();
      }
      return (Node)localObject;
    }
    Object localObject = lastChild;
    for (int i = children - 1; i > paramInt; i--) {
      localObject = ((Node)localObject).getPreviousSibling();
    }
    return (Node)localObject;
  }
  
  public int getLength()
  {
    return children;
  }
  
  public ExtendedNode append(ExtendedNode paramExtendedNode)
  {
    if (lastChild == null)
    {
      firstChild = paramExtendedNode;
    }
    else
    {
      lastChild.setNextSibling(paramExtendedNode);
      paramExtendedNode.setPreviousSibling(lastChild);
    }
    lastChild = paramExtendedNode;
    children += 1;
    return paramExtendedNode;
  }
  
  public ExtendedNode insert(ExtendedNode paramExtendedNode1, ExtendedNode paramExtendedNode2)
  {
    if (paramExtendedNode2 == null) {
      return append(paramExtendedNode1);
    }
    if (paramExtendedNode2 == firstChild)
    {
      firstChild.setPreviousSibling(paramExtendedNode1);
      paramExtendedNode1.setNextSibling(firstChild);
      firstChild = paramExtendedNode1;
      children += 1;
      return paramExtendedNode1;
    }
    if (paramExtendedNode2 == lastChild)
    {
      localExtendedNode = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
      localExtendedNode.setNextSibling(paramExtendedNode1);
      paramExtendedNode2.setPreviousSibling(paramExtendedNode1);
      paramExtendedNode1.setNextSibling(paramExtendedNode2);
      paramExtendedNode1.setPreviousSibling(localExtendedNode);
      children += 1;
      return paramExtendedNode1;
    }
    ExtendedNode localExtendedNode = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
    if ((localExtendedNode.getNextSibling() == paramExtendedNode2) && (localExtendedNode.getParentNode() == paramExtendedNode2.getParentNode()))
    {
      localExtendedNode.setNextSibling(paramExtendedNode1);
      paramExtendedNode1.setPreviousSibling(localExtendedNode);
      paramExtendedNode1.setNextSibling(paramExtendedNode2);
      paramExtendedNode2.setPreviousSibling(paramExtendedNode1);
      children += 1;
      return paramExtendedNode1;
    }
    throw this$0.createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode2.getNodeType()), paramExtendedNode2.getNodeName() });
  }
  
  public ExtendedNode replace(ExtendedNode paramExtendedNode1, ExtendedNode paramExtendedNode2)
  {
    if (paramExtendedNode2 == firstChild)
    {
      localExtendedNode1 = (ExtendedNode)firstChild.getNextSibling();
      paramExtendedNode1.setNextSibling(localExtendedNode1);
      if (paramExtendedNode2 == lastChild) {
        lastChild = paramExtendedNode1;
      } else {
        localExtendedNode1.setPreviousSibling(paramExtendedNode1);
      }
      firstChild.setNextSibling(null);
      firstChild = paramExtendedNode1;
      return paramExtendedNode2;
    }
    if (paramExtendedNode2 == lastChild)
    {
      localExtendedNode1 = (ExtendedNode)lastChild.getPreviousSibling();
      paramExtendedNode1.setPreviousSibling(localExtendedNode1);
      localExtendedNode1.setNextSibling(paramExtendedNode1);
      lastChild.setPreviousSibling(null);
      lastChild = paramExtendedNode1;
      return paramExtendedNode2;
    }
    ExtendedNode localExtendedNode1 = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
    ExtendedNode localExtendedNode2 = (ExtendedNode)paramExtendedNode2.getNextSibling();
    if ((localExtendedNode1.getNextSibling() == paramExtendedNode2) && (localExtendedNode2.getPreviousSibling() == paramExtendedNode2) && (localExtendedNode1.getParentNode() == paramExtendedNode2.getParentNode()) && (localExtendedNode2.getParentNode() == paramExtendedNode2.getParentNode()))
    {
      localExtendedNode1.setNextSibling(paramExtendedNode1);
      paramExtendedNode1.setPreviousSibling(localExtendedNode1);
      paramExtendedNode1.setNextSibling(localExtendedNode2);
      localExtendedNode2.setPreviousSibling(paramExtendedNode1);
      paramExtendedNode2.setPreviousSibling(null);
      paramExtendedNode2.setNextSibling(null);
      return paramExtendedNode2;
    }
    throw this$0.createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode2.getNodeType()), paramExtendedNode2.getNodeName() });
  }
  
  public ExtendedNode remove(ExtendedNode paramExtendedNode)
  {
    if (paramExtendedNode == firstChild)
    {
      if (paramExtendedNode == lastChild)
      {
        firstChild = null;
        lastChild = null;
        children -= 1;
        return paramExtendedNode;
      }
      firstChild = ((ExtendedNode)firstChild.getNextSibling());
      firstChild.setPreviousSibling(null);
      paramExtendedNode.setNextSibling(null);
      children -= 1;
      return paramExtendedNode;
    }
    if (paramExtendedNode == lastChild)
    {
      lastChild = ((ExtendedNode)lastChild.getPreviousSibling());
      lastChild.setNextSibling(null);
      paramExtendedNode.setPreviousSibling(null);
      children -= 1;
      return paramExtendedNode;
    }
    ExtendedNode localExtendedNode1 = (ExtendedNode)paramExtendedNode.getPreviousSibling();
    ExtendedNode localExtendedNode2 = (ExtendedNode)paramExtendedNode.getNextSibling();
    if ((localExtendedNode1.getNextSibling() == paramExtendedNode) && (localExtendedNode2.getPreviousSibling() == paramExtendedNode) && (localExtendedNode1.getParentNode() == paramExtendedNode.getParentNode()) && (localExtendedNode2.getParentNode() == paramExtendedNode.getParentNode()))
    {
      localExtendedNode1.setNextSibling(localExtendedNode2);
      localExtendedNode2.setPreviousSibling(localExtendedNode1);
      paramExtendedNode.setPreviousSibling(null);
      paramExtendedNode.setNextSibling(null);
      children -= 1;
      return paramExtendedNode;
    }
    throw this$0.createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode.getNodeType()), paramExtendedNode.getNodeName() });
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractParentNode.ChildNodes
 * 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;

public class AbstractParentNode$ElementsByTagName
  implements NodeList
{
  protected Node[] table;
  protected int size;
  protected String name;
  private final AbstractParentNode this$0;
  
  public AbstractParentNode$ElementsByTagName(AbstractParentNode paramAbstractParentNode, String paramString)
  {
    this$0 = paramAbstractParentNode;
    size = -1;
    name = paramString;
  }
  
  public Node item(int paramInt)
  {
    if (size == -1) {
      initialize();
    }
    if ((table == null) || (paramInt < 0) || (paramInt >= size)) {
      return null;
    }
    return table[paramInt];
  }
  
  public int getLength()
  {
    if (size == -1) {
      initialize();
    }
    return size;
  }
  
  public void invalidate()
  {
    size = -1;
  }
  
  protected void append(Node paramNode)
  {
    if (table == null)
    {
      table = new Node[11];
    }
    else if (size == table.length - 1)
    {
      Node[] arrayOfNode = new Node[table.length * 2 + 1];
      for (int i = 0; i < size; i++) {
        arrayOfNode[i] = table[i];
      }
      table = arrayOfNode;
    }
    table[(size++)] = paramNode;
  }
  
  protected void initialize()
  {
    size = 0;
    for (Node localNode = this$0.getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
      initialize(localNode);
    }
  }
  
  private void initialize(Node paramNode)
  {
    if (paramNode.getNodeType() == 1)
    {
      localObject = paramNode.getNodeName();
      if ((name.equals("*")) || (name.equals(localObject))) {
        append(paramNode);
      }
    }
    for (Object localObject = paramNode.getFirstChild(); localObject != null; localObject = ((Node)localObject).getNextSibling()) {
      initialize((Node)localObject);
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractParentNode.ElementsByTagName
 * 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;

public class AbstractParentNode$ElementsByTagNameNS
  implements NodeList
{
  protected Node[] table;
  protected int size;
  protected String namespaceURI;
  protected String localName;
  private final AbstractParentNode this$0;
  
  public AbstractParentNode$ElementsByTagNameNS(AbstractParentNode paramAbstractParentNode, String paramString1, String paramString2)
  {
    this$0 = paramAbstractParentNode;
    size = -1;
    namespaceURI = paramString1;
    localName = paramString2;
  }
  
  public Node item(int paramInt)
  {
    if (size == -1) {
      initialize();
    }
    if ((table == null) || (paramInt < 0) || (paramInt > size)) {
      return null;
    }
    return table[paramInt];
  }
  
  public int getLength()
  {
    if (size == -1) {
      initialize();
    }
    return size;
  }
  
  public void invalidate()
  {
    size = -1;
  }
  
  protected void append(Node paramNode)
  {
    if (table == null)
    {
      table = new Node[11];
    }
    else if (size == table.length - 1)
    {
      Node[] arrayOfNode = new Node[table.length * 2 + 1];
      for (int i = 0; i < size; i++) {
        arrayOfNode[i] = table[i];
      }
      table = arrayOfNode;
    }
    table[(size++)] = paramNode;
  }
  
  protected void initialize()
  {
    size = 0;
    for (Node localNode = this$0.getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
      initialize(localNode);
    }
  }
  
  private void initialize(Node paramNode)
  {
    if (paramNode.getNodeType() == 1)
    {
      localObject = paramNode.getNamespaceURI();
      String str = localObject == null ? paramNode.getNodeName() : paramNode.getLocalName();
      if ((nsMatch(namespaceURI, paramNode.getNamespaceURI())) && ((localName.equals("*")) || (localName.equals(str)))) {
        append(paramNode);
      }
    }
    for (Object localObject = paramNode.getFirstChild(); localObject != null; localObject = ((Node)localObject).getNextSibling()) {
      initialize((Node)localObject);
    }
  }
  
  private boolean nsMatch(String paramString1, String paramString2)
  {
    if ((paramString1 == null) && (paramString2 == null)) {
      return true;
    }
    if ((paramString1 == null) || (paramString2 == null)) {
      return false;
    }
    if (paramString1.equals("*")) {
      return true;
    }
    return paramString1.equals(paramString2);
  }
}

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

import java.io.Serializable;
import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.events.DocumentEvent;
import org.w3c.dom.events.MutationEvent;

public abstract class AbstractParentNode
  extends AbstractNode
{
  protected ChildNodes childNodes;
  
  public NodeList getChildNodes()
  {
    return childNodes == null ? (childNodes = new ChildNodes()) : childNodes;
  }
  
  public Node getFirstChild()
  {
    return childNodes == null ? null : childNodes.firstChild;
  }
  
  public Node getLastChild()
  {
    return childNodes == null ? null : childNodes.lastChild;
  }
  
  public Node insertBefore(Node paramNode1, Node paramNode2)
    throws DOMException
  {
    if ((paramNode2 != null) && ((childNodes == null) || (paramNode2.getParentNode() != this))) {
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramNode2.getNodeType()), paramNode2.getNodeName() });
    }
    checkAndRemove(paramNode1, false);
    if (paramNode1.getNodeType() == 11)
    {
      Node localNode;
      for (localObject = paramNode1.getFirstChild(); localObject != null; localObject = localNode)
      {
        localNode = ((Node)localObject).getNextSibling();
        insertBefore((Node)localObject, paramNode2);
      }
      return paramNode1;
    }
    if (childNodes == null) {
      childNodes = new ChildNodes();
    }
    Object localObject = childNodes.insert((ExtendedNode)paramNode1, (ExtendedNode)paramNode2);
    ((ExtendedNode)localObject).setParentNode(this);
    nodeAdded((Node)localObject);
    fireDOMNodeInsertedEvent((Node)localObject);
    fireDOMSubtreeModifiedEvent();
    return (Node)localObject;
  }
  
  public Node replaceChild(Node paramNode1, Node paramNode2)
    throws DOMException
  {
    if ((childNodes == null) || (paramNode2.getParentNode() != this)) {
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramNode2.getNodeType()), paramNode2.getNodeName() });
    }
    checkAndRemove(paramNode1, true);
    if (paramNode1.getNodeType() == 11)
    {
      localObject1 = paramNode1.getLastChild();
      if (localObject1 == null) {
        return paramNode1;
      }
      localObject2 = ((Node)localObject1).getPreviousSibling();
      replaceChild((Node)localObject1, paramNode2);
      Object localObject3 = localObject1;
      for (localObject1 = localObject2; localObject1 != null; localObject1 = localObject2)
      {
        localObject2 = ((Node)localObject1).getPreviousSibling();
        insertBefore((Node)localObject1, (Node)localObject3);
        localObject3 = localObject1;
      }
      return paramNode1;
    }
    fireDOMNodeRemovedEvent(paramNode2);
    getCurrentDocument().nodeToBeRemoved(paramNode2);
    nodeToBeRemoved(paramNode2);
    Object localObject1 = (ExtendedNode)paramNode1;
    Object localObject2 = childNodes.replace((ExtendedNode)localObject1, (ExtendedNode)paramNode2);
    ((ExtendedNode)localObject1).setParentNode(this);
    ((ExtendedNode)localObject2).setParentNode(null);
    nodeAdded((Node)localObject1);
    fireDOMNodeInsertedEvent((Node)localObject1);
    fireDOMSubtreeModifiedEvent();
    return (Node)localObject1;
  }
  
  public Node removeChild(Node paramNode)
    throws DOMException
  {
    if ((childNodes == null) || (paramNode.getParentNode() != this)) {
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    fireDOMNodeRemovedEvent(paramNode);
    getCurrentDocument().nodeToBeRemoved(paramNode);
    nodeToBeRemoved(paramNode);
    ExtendedNode localExtendedNode = childNodes.remove((ExtendedNode)paramNode);
    localExtendedNode.setParentNode(null);
    fireDOMSubtreeModifiedEvent();
    return localExtendedNode;
  }
  
  public Node appendChild(Node paramNode)
    throws DOMException
  {
    checkAndRemove(paramNode, false);
    if (paramNode.getNodeType() == 11)
    {
      Node localNode;
      for (localObject = paramNode.getFirstChild(); localObject != null; localObject = localNode)
      {
        localNode = ((Node)localObject).getNextSibling();
        appendChild((Node)localObject);
      }
      return paramNode;
    }
    if (childNodes == null) {
      childNodes = new ChildNodes();
    }
    Object localObject = childNodes.append((ExtendedNode)paramNode);
    ((ExtendedNode)localObject).setParentNode(this);
    nodeAdded((Node)localObject);
    fireDOMNodeInsertedEvent((Node)localObject);
    fireDOMSubtreeModifiedEvent();
    return (Node)localObject;
  }
  
  public boolean hasChildNodes()
  {
    return (childNodes != null) && (childNodes.getLength() != 0);
  }
  
  public void normalize()
  {
    Object localObject = getFirstChild();
    if (localObject != null)
    {
      ((Node)localObject).normalize();
      Node localNode = ((Node)localObject).getNextSibling();
      while (localNode != null) {
        if ((((Node)localObject).getNodeType() == 3) && (localNode.getNodeType() == 3))
        {
          String str = ((Node)localObject).getNodeValue() + localNode.getNodeValue();
          AbstractText localAbstractText = (AbstractText)localObject;
          localAbstractText.setNodeValue(str);
          removeChild(localNode);
          localNode = ((Node)localObject).getNextSibling();
        }
        else
        {
          localNode.normalize();
          localObject = localNode;
          localNode = localNode.getNextSibling();
        }
      }
    }
  }
  
  public NodeList getElementsByTagName(String paramString)
  {
    if (paramString == null) {
      return AbstractNode.EMPTY_NODE_LIST;
    }
    AbstractDocument localAbstractDocument = getCurrentDocument();
    ElementsByTagName localElementsByTagName = localAbstractDocument.getElementsByTagName(this, paramString);
    if (localElementsByTagName == null)
    {
      localElementsByTagName = new ElementsByTagName(paramString);
      localAbstractDocument.putElementsByTagName(this, paramString, localElementsByTagName);
    }
    return localElementsByTagName;
  }
  
  public NodeList getElementsByTagNameNS(String paramString1, String paramString2)
  {
    if (paramString2 == null) {
      return AbstractNode.EMPTY_NODE_LIST;
    }
    AbstractDocument localAbstractDocument = getCurrentDocument();
    ElementsByTagNameNS localElementsByTagNameNS = localAbstractDocument.getElementsByTagNameNS(this, paramString1, paramString2);
    if (localElementsByTagNameNS == null)
    {
      localElementsByTagNameNS = new ElementsByTagNameNS(paramString1, paramString2);
      localAbstractDocument.putElementsByTagNameNS(this, paramString1, paramString2, localElementsByTagNameNS);
    }
    return localElementsByTagNameNS;
  }
  
  public void fireDOMNodeInsertedIntoDocumentEvent()
  {
    AbstractDocument localAbstractDocument = getCurrentDocument();
    if (localAbstractDocument.getEventsEnabled())
    {
      super.fireDOMNodeInsertedIntoDocumentEvent();
      for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        ((AbstractNode)localNode).fireDOMNodeInsertedIntoDocumentEvent();
      }
    }
  }
  
  public void fireDOMNodeRemovedFromDocumentEvent()
  {
    AbstractDocument localAbstractDocument = getCurrentDocument();
    if (localAbstractDocument.getEventsEnabled())
    {
      super.fireDOMNodeRemovedFromDocumentEvent();
      for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        ((AbstractNode)localNode).fireDOMNodeRemovedFromDocumentEvent();
      }
    }
  }
  
  protected void nodeAdded(Node paramNode) {}
  
  protected void nodeToBeRemoved(Node paramNode) {}
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    for (Node localNode1 = getFirstChild(); localNode1 != null; localNode1 = localNode1.getNextSibling())
    {
      Node localNode2 = ((AbstractNode)localNode1).deepExport(localNode1.cloneNode(false), paramAbstractDocument);
      paramNode.appendChild(localNode2);
    }
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    for (Node localNode1 = getFirstChild(); localNode1 != null; localNode1 = localNode1.getNextSibling())
    {
      Node localNode2 = localNode1.cloneNode(true);
      paramNode.appendChild(localNode2);
    }
    return paramNode;
  }
  
  protected void fireDOMSubtreeModifiedEvent()
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMSubtreeModified", true, false, null, null, null, null, (short)1);
      dispatchEvent(localMutationEvent);
    }
  }
  
  protected void fireDOMNodeInsertedEvent(Node paramNode)
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMNodeInserted", true, false, this, null, null, null, (short)2);
      AbstractNode localAbstractNode = (AbstractNode)paramNode;
      localAbstractNode.dispatchEvent(localMutationEvent);
      localAbstractNode.fireDOMNodeInsertedIntoDocumentEvent();
    }
  }
  
  protected void fireDOMNodeRemovedEvent(Node paramNode)
  {
    AbstractDocument localAbstractDocument1 = getCurrentDocument();
    if (localAbstractDocument1.getEventsEnabled())
    {
      AbstractDocument localAbstractDocument2 = localAbstractDocument1;
      MutationEvent localMutationEvent = (MutationEvent)localAbstractDocument2.createEvent("MutationEvents");
      localMutationEvent.initMutationEvent("DOMNodeRemoved", true, false, this, null, null, null, (short)3);
      AbstractNode localAbstractNode = (AbstractNode)paramNode;
      localAbstractNode.dispatchEvent(localMutationEvent);
      localAbstractNode.fireDOMNodeRemovedFromDocumentEvent();
    }
  }
  
  protected void checkAndRemove(Node paramNode, boolean paramBoolean)
  {
    checkChildType(paramNode, paramBoolean);
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    if (paramNode.getOwnerDocument() != getCurrentDocument()) {
      throw createDOMException((short)4, "node.from.wrong.document", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    if (this == paramNode) {
      throw createDOMException((short)3, "add.self", new Object[] { getNodeName() });
    }
    Node localNode1 = paramNode.getParentNode();
    if (localNode1 == null) {
      return;
    }
    for (Node localNode2 = getParentNode(); localNode2 != null; localNode2 = localNode2.getParentNode()) {
      if (localNode2 == paramNode) {
        throw createDOMException((short)3, "add.ancestor", new Object[] { new Integer(getNodeType()), getNodeName() });
      }
    }
    localNode1.removeChild(paramNode);
  }
  
  protected class ChildNodes
    implements NodeList, Serializable
  {
    protected ExtendedNode firstChild;
    protected ExtendedNode lastChild;
    protected int children;
    
    public ChildNodes() {}
    
    public Node item(int paramInt)
    {
      if ((paramInt < 0) || (paramInt >= children)) {
        return null;
      }
      if (paramInt < children >> 1)
      {
        localObject = firstChild;
        for (i = 0; i < paramInt; i++) {
          localObject = ((Node)localObject).getNextSibling();
        }
        return (Node)localObject;
      }
      Object localObject = lastChild;
      for (int i = children - 1; i > paramInt; i--) {
        localObject = ((Node)localObject).getPreviousSibling();
      }
      return (Node)localObject;
    }
    
    public int getLength()
    {
      return children;
    }
    
    public ExtendedNode append(ExtendedNode paramExtendedNode)
    {
      if (lastChild == null)
      {
        firstChild = paramExtendedNode;
      }
      else
      {
        lastChild.setNextSibling(paramExtendedNode);
        paramExtendedNode.setPreviousSibling(lastChild);
      }
      lastChild = paramExtendedNode;
      children += 1;
      return paramExtendedNode;
    }
    
    public ExtendedNode insert(ExtendedNode paramExtendedNode1, ExtendedNode paramExtendedNode2)
    {
      if (paramExtendedNode2 == null) {
        return append(paramExtendedNode1);
      }
      if (paramExtendedNode2 == firstChild)
      {
        firstChild.setPreviousSibling(paramExtendedNode1);
        paramExtendedNode1.setNextSibling(firstChild);
        firstChild = paramExtendedNode1;
        children += 1;
        return paramExtendedNode1;
      }
      if (paramExtendedNode2 == lastChild)
      {
        localExtendedNode = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
        localExtendedNode.setNextSibling(paramExtendedNode1);
        paramExtendedNode2.setPreviousSibling(paramExtendedNode1);
        paramExtendedNode1.setNextSibling(paramExtendedNode2);
        paramExtendedNode1.setPreviousSibling(localExtendedNode);
        children += 1;
        return paramExtendedNode1;
      }
      ExtendedNode localExtendedNode = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
      if ((localExtendedNode.getNextSibling() == paramExtendedNode2) && (localExtendedNode.getParentNode() == paramExtendedNode2.getParentNode()))
      {
        localExtendedNode.setNextSibling(paramExtendedNode1);
        paramExtendedNode1.setPreviousSibling(localExtendedNode);
        paramExtendedNode1.setNextSibling(paramExtendedNode2);
        paramExtendedNode2.setPreviousSibling(paramExtendedNode1);
        children += 1;
        return paramExtendedNode1;
      }
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode2.getNodeType()), paramExtendedNode2.getNodeName() });
    }
    
    public ExtendedNode replace(ExtendedNode paramExtendedNode1, ExtendedNode paramExtendedNode2)
    {
      if (paramExtendedNode2 == firstChild)
      {
        localExtendedNode1 = (ExtendedNode)firstChild.getNextSibling();
        paramExtendedNode1.setNextSibling(localExtendedNode1);
        if (paramExtendedNode2 == lastChild) {
          lastChild = paramExtendedNode1;
        } else {
          localExtendedNode1.setPreviousSibling(paramExtendedNode1);
        }
        firstChild.setNextSibling(null);
        firstChild = paramExtendedNode1;
        return paramExtendedNode2;
      }
      if (paramExtendedNode2 == lastChild)
      {
        localExtendedNode1 = (ExtendedNode)lastChild.getPreviousSibling();
        paramExtendedNode1.setPreviousSibling(localExtendedNode1);
        localExtendedNode1.setNextSibling(paramExtendedNode1);
        lastChild.setPreviousSibling(null);
        lastChild = paramExtendedNode1;
        return paramExtendedNode2;
      }
      ExtendedNode localExtendedNode1 = (ExtendedNode)paramExtendedNode2.getPreviousSibling();
      ExtendedNode localExtendedNode2 = (ExtendedNode)paramExtendedNode2.getNextSibling();
      if ((localExtendedNode1.getNextSibling() == paramExtendedNode2) && (localExtendedNode2.getPreviousSibling() == paramExtendedNode2) && (localExtendedNode1.getParentNode() == paramExtendedNode2.getParentNode()) && (localExtendedNode2.getParentNode() == paramExtendedNode2.getParentNode()))
      {
        localExtendedNode1.setNextSibling(paramExtendedNode1);
        paramExtendedNode1.setPreviousSibling(localExtendedNode1);
        paramExtendedNode1.setNextSibling(localExtendedNode2);
        localExtendedNode2.setPreviousSibling(paramExtendedNode1);
        paramExtendedNode2.setPreviousSibling(null);
        paramExtendedNode2.setNextSibling(null);
        return paramExtendedNode2;
      }
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode2.getNodeType()), paramExtendedNode2.getNodeName() });
    }
    
    public ExtendedNode remove(ExtendedNode paramExtendedNode)
    {
      if (paramExtendedNode == firstChild)
      {
        if (paramExtendedNode == lastChild)
        {
          firstChild = null;
          lastChild = null;
          children -= 1;
          return paramExtendedNode;
        }
        firstChild = ((ExtendedNode)firstChild.getNextSibling());
        firstChild.setPreviousSibling(null);
        paramExtendedNode.setNextSibling(null);
        children -= 1;
        return paramExtendedNode;
      }
      if (paramExtendedNode == lastChild)
      {
        lastChild = ((ExtendedNode)lastChild.getPreviousSibling());
        lastChild.setNextSibling(null);
        paramExtendedNode.setPreviousSibling(null);
        children -= 1;
        return paramExtendedNode;
      }
      ExtendedNode localExtendedNode1 = (ExtendedNode)paramExtendedNode.getPreviousSibling();
      ExtendedNode localExtendedNode2 = (ExtendedNode)paramExtendedNode.getNextSibling();
      if ((localExtendedNode1.getNextSibling() == paramExtendedNode) && (localExtendedNode2.getPreviousSibling() == paramExtendedNode) && (localExtendedNode1.getParentNode() == paramExtendedNode.getParentNode()) && (localExtendedNode2.getParentNode() == paramExtendedNode.getParentNode()))
      {
        localExtendedNode1.setNextSibling(localExtendedNode2);
        localExtendedNode2.setPreviousSibling(localExtendedNode1);
        paramExtendedNode.setPreviousSibling(null);
        paramExtendedNode.setNextSibling(null);
        children -= 1;
        return paramExtendedNode;
      }
      throw createDOMException((short)8, "child.missing", new Object[] { new Integer(paramExtendedNode.getNodeType()), paramExtendedNode.getNodeName() });
    }
  }
  
  protected class ElementsByTagName
    implements NodeList
  {
    protected Node[] table;
    protected int size = -1;
    protected String name;
    
    public ElementsByTagName(String paramString)
    {
      name = paramString;
    }
    
    public Node item(int paramInt)
    {
      if (size == -1) {
        initialize();
      }
      if ((table == null) || (paramInt < 0) || (paramInt >= size)) {
        return null;
      }
      return table[paramInt];
    }
    
    public int getLength()
    {
      if (size == -1) {
        initialize();
      }
      return size;
    }
    
    public void invalidate()
    {
      size = -1;
    }
    
    protected void append(Node paramNode)
    {
      if (table == null)
      {
        table = new Node[11];
      }
      else if (size == table.length - 1)
      {
        Node[] arrayOfNode = new Node[table.length * 2 + 1];
        for (int i = 0; i < size; i++) {
          arrayOfNode[i] = table[i];
        }
        table = arrayOfNode;
      }
      table[(size++)] = paramNode;
    }
    
    protected void initialize()
    {
      size = 0;
      for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        initialize(localNode);
      }
    }
    
    private void initialize(Node paramNode)
    {
      if (paramNode.getNodeType() == 1)
      {
        localObject = paramNode.getNodeName();
        if ((name.equals("*")) || (name.equals(localObject))) {
          append(paramNode);
        }
      }
      for (Object localObject = paramNode.getFirstChild(); localObject != null; localObject = ((Node)localObject).getNextSibling()) {
        initialize((Node)localObject);
      }
    }
  }
  
  protected class ElementsByTagNameNS
    implements NodeList
  {
    protected Node[] table;
    protected int size = -1;
    protected String namespaceURI;
    protected String localName;
    
    public ElementsByTagNameNS(String paramString1, String paramString2)
    {
      namespaceURI = paramString1;
      localName = paramString2;
    }
    
    public Node item(int paramInt)
    {
      if (size == -1) {
        initialize();
      }
      if ((table == null) || (paramInt < 0) || (paramInt > size)) {
        return null;
      }
      return table[paramInt];
    }
    
    public int getLength()
    {
      if (size == -1) {
        initialize();
      }
      return size;
    }
    
    public void invalidate()
    {
      size = -1;
    }
    
    protected void append(Node paramNode)
    {
      if (table == null)
      {
        table = new Node[11];
      }
      else if (size == table.length - 1)
      {
        Node[] arrayOfNode = new Node[table.length * 2 + 1];
        for (int i = 0; i < size; i++) {
          arrayOfNode[i] = table[i];
        }
        table = arrayOfNode;
      }
      table[(size++)] = paramNode;
    }
    
    protected void initialize()
    {
      size = 0;
      for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        initialize(localNode);
      }
    }
    
    private void initialize(Node paramNode)
    {
      if (paramNode.getNodeType() == 1)
      {
        localObject = paramNode.getNamespaceURI();
        String str = localObject == null ? paramNode.getNodeName() : paramNode.getLocalName();
        if ((nsMatch(namespaceURI, paramNode.getNamespaceURI())) && ((localName.equals("*")) || (localName.equals(str)))) {
          append(paramNode);
        }
      }
      for (Object localObject = paramNode.getFirstChild(); localObject != null; localObject = ((Node)localObject).getNextSibling()) {
        initialize((Node)localObject);
      }
    }
    
    private boolean nsMatch(String paramString1, String paramString2)
    {
      if ((paramString1 == null) && (paramString2 == null)) {
        return true;
      }
      if ((paramString1 == null) || (paramString2 == null)) {
        return false;
      }
      if (paramString1.equals("*")) {
        return true;
      }
      return paramString1.equals(paramString2);
    }
  }
}

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

import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
import org.w3c.dom.ProcessingInstruction;

public abstract class AbstractProcessingInstruction
  extends AbstractChildNode
  implements ProcessingInstruction
{
  protected String data;
  
  publ
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