org.apache.batik.dom_1.6.0.v201011041432

16:40:52.033 INFO  jd.cli.Main - Decompiling org.apache.batik.dom_1.6.0.v201011041432.jar
package org.apache.batik.dom;

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.Node;

public abstract class AbstractAttr
  extends AbstractParentNode
  implements Attr
{
  protected String nodeName;
  protected boolean unspecified;
  protected boolean isIdAttr;
  protected AbstractElement ownerElement;
  
  protected AbstractAttr() {}
  
  protected AbstractAttr(String paramString, AbstractDocument paramAbstractDocument)
    throws DOMException
  {
    ownerDocument = paramAbstractDocument;
    if (!DOMUtilities.isValidName(paramString)) {
      throw createDOMException((short)5, "xml.name", new Object[] { paramString });
    }
  }
  
  public boolean isId()
  {
    return isIdAttr;
  }
  
  public void setIsId(boolean paramBoolean)
  {
    isIdAttr = paramBoolean;
  }
  
  public void setNodeName(String paramString)
  {
    nodeName = paramString;
    isIdAttr = ownerDocument.isId(this);
  }
  
  public String getNodeName()
  {
    return nodeName;
  }
  
  public short getNodeType()
  {
    return 2;
  }
  
  public String getNodeValue()
    throws DOMException
  {
    Node localNode1 = getFirstChild();
    if (localNode1 == null) {
      return "";
    }
    Node localNode2 = localNode1.getNextSibling();
    if (localNode2 == null) {
      return localNode1.getNodeValue();
    }
    StringBuffer localStringBuffer = new StringBuffer(localNode1.getNodeValue());
    do
    {
      localStringBuffer.append(localNode2.getNodeValue());
      localNode2 = localNode2.getNextSibling();
    } while (localNode2 != null);
    return localStringBuffer.toString();
  }
  
  public void setNodeValue(String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    String str1 = getNodeValue();
    while ((localObject = getFirstChild()) != null) {
      removeChild((Node)localObject);
    }
    String str2 = paramString == null ? "" : paramString;
    Object localObject = getOwnerDocument().createTextNode(str2);
    appendChild((Node)localObject);
    if (ownerElement != null) {
      ownerElement.fireDOMAttrModifiedEvent(nodeName, this, str1, str2, (short)1);
    }
  }
  
  public String getName()
  {
    return getNodeName();
  }
  
  public boolean getSpecified()
  {
    return !unspecified;
  }
  
  public void setSpecified(boolean paramBoolean)
  {
    unspecified = (!paramBoolean);
  }
  
  public String getValue()
  {
    return getNodeValue();
  }
  
  public void setValue(String paramString)
    throws DOMException
  {
    setNodeValue(paramString);
  }
  
  public void setOwnerElement(AbstractElement paramAbstractElement)
  {
    ownerElement = paramAbstractElement;
  }
  
  public Element getOwnerElement()
  {
    return ownerElement;
  }
  
  protected void nodeAdded(Node paramNode)
  {
    setSpecified(true);
  }
  
  protected void nodeToBeRemoved(Node paramNode)
  {
    setSpecified(true);
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractAttr localAbstractAttr = (AbstractAttr)paramNode;
    nodeName = nodeName;
    unspecified = false;
    isIdAttr = paramAbstractDocument.isId(localAbstractAttr);
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractAttr localAbstractAttr = (AbstractAttr)paramNode;
    nodeName = nodeName;
    unspecified = false;
    isIdAttr = paramAbstractDocument.isId(localAbstractAttr);
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractAttr localAbstractAttr = (AbstractAttr)paramNode;
    nodeName = nodeName;
    unspecified = unspecified;
    isIdAttr = isIdAttr;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractAttr localAbstractAttr = (AbstractAttr)paramNode;
    nodeName = nodeName;
    unspecified = unspecified;
    isIdAttr = isIdAttr;
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    switch (paramNode.getNodeType())
    {
    case 3: 
    case 5: 
    case 11: 
      break;
    default: 
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(paramNode.getNodeType()), paramNode.getNodeName() });
    }
  }
  
  protected void fireDOMSubtreeModifiedEvent()
  {
    AbstractDocument localAbstractDocument = getCurrentDocument();
    if (localAbstractDocument.getEventsEnabled())
    {
      super.fireDOMSubtreeModifiedEvent();
      if (getOwnerElement() != null) {
        ((AbstractElement)getOwnerElement()).fireDOMSubtreeModifiedEvent();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractAttr
 * 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 AbstractAttrNS
  extends AbstractAttr
{
  protected String namespaceURI;
  
  protected AbstractAttrNS() {}
  
  protected AbstractAttrNS(String paramString1, String paramString2, AbstractDocument paramAbstractDocument)
    throws DOMException
  {
    super(paramString2, paramAbstractDocument);
    namespaceURI = paramString1;
    String str = DOMUtilities.getPrefix(paramString2);
    if (str != null)
    {
      if ((paramString1 == null) || (paramString1.equals("")) || (("xml".equals(str)) && (!"http://www.w3.org/XML/1998/namespace".equals(paramString1))) || (("xmlns".equals(str)) && (!"http://www.w3.org/2000/xmlns/".equals(paramString1)))) {
        throw createDOMException((short)14, "namespace.uri", new Object[] { new Integer(getNodeType()), getNodeName(), paramString1 });
      }
    }
    else if (("xmlns".equals(paramString2)) && (!"http://www.w3.org/2000/xmlns/".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);
    AbstractAttrNS localAbstractAttrNS = (AbstractAttrNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractAttrNS localAbstractAttrNS = (AbstractAttrNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractAttrNS localAbstractAttrNS = (AbstractAttrNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractAttrNS localAbstractAttrNS = (AbstractAttrNS)paramNode;
    namespaceURI = namespaceURI;
    return paramNode;
  }
}

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

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

public abstract class AbstractCharacterData
  extends AbstractChildNode
  implements CharacterData
{
  protected String nodeValue = "";
  
  public String getNodeValue()
    throws DOMException
  {
    return nodeValue;
  }
  
  public void setNodeValue(String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    String str = nodeValue;
    nodeValue = (paramString == null ? "" : paramString);
    fireDOMCharacterDataModifiedEvent(str, nodeValue);
    if (getParentNode() != null) {
      ((AbstractParentNode)getParentNode()).fireDOMSubtreeModifiedEvent();
    }
  }
  
  public String getData()
    throws DOMException
  {
    return getNodeValue();
  }
  
  public void setData(String paramString)
    throws DOMException
  {
    setNodeValue(paramString);
  }
  
  public int getLength()
  {
    return nodeValue.length();
  }
  
  public String substringData(int paramInt1, int paramInt2)
    throws DOMException
  {
    checkOffsetCount(paramInt1, paramInt2);
    String str = getNodeValue();
    return str.substring(paramInt1, Math.min(str.length(), paramInt1 + paramInt2));
  }
  
  public void appendData(String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    setNodeValue(getNodeValue() + (paramString == null ? "" : paramString));
  }
  
  public void insertData(int paramInt, String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    if ((paramInt < 0) || (paramInt > getLength())) {
      throw createDOMException((short)1, "offset", new Object[] { new Integer(paramInt) });
    }
    String str = getNodeValue();
    setNodeValue(str.substring(0, paramInt) + paramString + str.substring(paramInt, str.length()));
  }
  
  public void deleteData(int paramInt1, int paramInt2)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    checkOffsetCount(paramInt1, paramInt2);
    String str = getNodeValue();
    setNodeValue(str.substring(0, paramInt1) + str.substring(Math.min(str.length(), paramInt1 + paramInt2), str.length()));
  }
  
  public void replaceData(int paramInt1, int paramInt2, String paramString)
    throws DOMException
  {
    if (isReadonly()) {
      throw createDOMException((short)7, "readonly.node", new Object[] { new Integer(getNodeType()), getNodeName() });
    }
    checkOffsetCount(paramInt1, paramInt2);
    String str = getNodeValue();
    setNodeValue(str.substring(0, paramInt1) + paramString + str.substring(Math.min(str.length(), paramInt1 + paramInt2), str.length()));
  }
  
  protected void checkOffsetCount(int paramInt1, int paramInt2)
    throws DOMException
  {
    if ((paramInt1 < 0) || (paramInt1 >= getLength())) {
      throw createDOMException((short)1, "offset", new Object[] { new Integer(paramInt1) });
    }
    if (paramInt2 < 0) {
      throw createDOMException((short)1, "negative.count", new Object[] { new Integer(paramInt2) });
    }
  }
  
  protected Node export(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.export(paramNode, paramAbstractDocument);
    AbstractCharacterData localAbstractCharacterData = (AbstractCharacterData)paramNode;
    nodeValue = nodeValue;
    return paramNode;
  }
  
  protected Node deepExport(Node paramNode, AbstractDocument paramAbstractDocument)
  {
    super.deepExport(paramNode, paramAbstractDocument);
    AbstractCharacterData localAbstractCharacterData = (AbstractCharacterData)paramNode;
    nodeValue = nodeValue;
    return paramNode;
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractCharacterData localAbstractCharacterData = (AbstractCharacterData)paramNode;
    nodeValue = nodeValue;
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractCharacterData localAbstractCharacterData = (AbstractCharacterData)paramNode;
    nodeValue = nodeValue;
    return paramNode;
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractCharacterData
 * 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 AbstractChildNode
  extends AbstractNode
{
  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.AbstractChildNode
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.apache.batik.dom;

import org.w3c.dom.Comment;

public abstract class AbstractComment
  extends AbstractCharacterData
  implements Comment
{
  public String getNodeName()
  {
    return "#comment";
  }
  
  public short getNodeType()
  {
    return 8;
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractComment
 * 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.DocumentEventSupport;
import org.apache.batik.dom.util.HashTable;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;

public abstract class AbstractDOMImplementation
  implements DOMImplementation, Serializable
{
  protected final HashTable features = new HashTable();
  
  protected void registerFeature(String paramString, Object paramObject)
  {
    features.put(paramString.toLowerCase(), paramObject);
  }
  
  protected AbstractDOMImplementation()
  {
    registerFeature("XML", new String[] { "1.0", "2.0" });
    registerFeature("Events", "2.0");
    registerFeature("MouseEvents", "2.0");
    registerFeature("MutationEvents", "2.0");
    registerFeature("Traversal", "2.0");
    registerFeature("UIEvents", "2.0");
  }
  
  public boolean hasFeature(String paramString1, String paramString2)
  {
    Object localObject = features.get(paramString1.toLowerCase());
    if (localObject == null) {
      return false;
    }
    if ((paramString2 == null) || (paramString2.length() == 0)) {
      return true;
    }
    if ((localObject instanceof String)) {
      return paramString2.equals(localObject);
    }
    String[] arrayOfString = (String[])localObject;
    for (int i = 0; i < arrayOfString.length; i++) {
      if (paramString2.equals(arrayOfString[i])) {
        return true;
      }
    }
    return false;
  }
  
  public DocumentEventSupport createDocumentEventSupport()
  {
    return new DocumentEventSupport();
  }
  
  public abstract Document createDocument(String paramString1, String paramString2, DocumentType paramDocumentType)
    throws DOMException;
  
  public abstract DocumentType createDocumentType(String paramString1, String paramString2, String paramString3)
    throws DOMException;
}

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

import java.util.List;
import java.util.Map;
import org.apache.batik.util.CleanerThread.SoftReferenceCleared;

public class AbstractDocument$IdSoftRef
  extends CleanerThread.SoftReferenceCleared
{
  String id;
  List list;
  private final AbstractDocument this$0;
  
  AbstractDocument$IdSoftRef(AbstractDocument paramAbstractDocument, Object paramObject, String paramString)
  {
    super(paramObject);
    this$0 = paramAbstractDocument;
    id = paramString;
  }
  
  AbstractDocument$IdSoftRef(AbstractDocument paramAbstractDocument, Object paramObject, String paramString, List paramList)
  {
    super(paramObject);
    this$0 = paramAbstractDocument;
    id = paramString;
    list = paramList;
  }
  
  public void setList(List paramList)
  {
    list = paramList;
  }
  
  public void cleared()
  {
    if (this$0.elementsById == null) {
      return;
    }
    synchronized (this$0.elementsById)
    {
      if (list != null)
      {
        list.remove(this);
      }
      else
      {
        Object localObject1 = this$0.elementsById.remove(id);
        if (localObject1 != this) {
          this$0.elementsById.put(id, localObject1);
        }
      }
    }
  }
}

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

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.ref.SoftReference;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.WeakHashMap;
import org.apache.batik.dom.events.DocumentEventSupport;
import org.apache.batik.dom.traversal.TraversalSupport;
import org.apache.batik.i18n.Localizable;
import org.apache.batik.i18n.LocalizableSupport;
import org.apache.batik.util.CleanerThread.SoftReferenceCleared;
import org.apache.batik.util.SoftDoublyIndexedTable;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
import org.w3c.dom.EntityReference;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.Text;
import org.w3c.dom.events.DocumentEvent;
import org.w3c.dom.events.Event;
import org.w3c.dom.traversal.DocumentTraversal;
import org.w3c.dom.traversal.NodeFilter;
import org.w3c.dom.traversal.NodeIterator;
import org.w3c.dom.traversal.TreeWalker;

public abstract class AbstractDocument
  extends AbstractParentNode
  implements Document, DocumentEvent, DocumentTraversal, Localizable
{
  protected static final String RESOURCES = "org.apache.batik.dom.resources.Messages";
  protected transient LocalizableSupport localizableSupport = new LocalizableSupport("org.apache.batik.dom.resources.Messages", getClass().getClassLoader());
  protected transient DOMImplementation implementation;
  protected transient TraversalSupport traversalSupport;
  protected transient DocumentEventSupport documentEventSupport;
  protected transient boolean eventsEnabled;
  protected transient WeakHashMap elementsByTagNames;
  protected transient WeakHashMap elementsByTagNamesNS;
  protected transient Map elementsById;
  
  protected AbstractDocument() {}
  
  public AbstractDocument(DocumentType paramDocumentType, DOMImplementation paramDOMImplementation)
  {
    implementation = paramDOMImplementation;
    if (paramDocumentType != null)
    {
      if ((paramDocumentType instanceof GenericDocumentType))
      {
        GenericDocumentType localGenericDocumentType = (GenericDocumentType)paramDocumentType;
        if (localGenericDocumentType.getOwnerDocument() == null) {
          localGenericDocumentType.setOwnerDocument(this);
        }
      }
      appendChild(paramDocumentType);
    }
  }
  
  public void setLocale(Locale paramLocale)
  {
    localizableSupport.setLocale(paramLocale);
  }
  
  public Locale getLocale()
  {
    return localizableSupport.getLocale();
  }
  
  public String formatMessage(String paramString, Object[] paramArrayOfObject)
    throws MissingResourceException
  {
    return localizableSupport.formatMessage(paramString, paramArrayOfObject);
  }
  
  public boolean getEventsEnabled()
  {
    return eventsEnabled;
  }
  
  public void setEventsEnabled(boolean paramBoolean)
  {
    eventsEnabled = paramBoolean;
  }
  
  public String getNodeName()
  {
    return "#document";
  }
  
  public short getNodeType()
  {
    return 9;
  }
  
  public DocumentType getDoctype()
  {
    for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
      if (localNode.getNodeType() == 10) {
        return (DocumentType)localNode;
      }
    }
    return null;
  }
  
  public void setDoctype(DocumentType paramDocumentType)
  {
    if (paramDocumentType != null)
    {
      appendChild(paramDocumentType);
      ((ExtendedNode)paramDocumentType).setReadonly(true);
    }
  }
  
  public DOMImplementation getImplementation()
  {
    return implementation;
  }
  
  public Element getDocumentElement()
  {
    for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
      if (localNode.getNodeType() == 1) {
        return (Element)localNode;
      }
    }
    return null;
  }
  
  public Node importNode(Node paramNode, boolean paramBoolean)
    throws DOMException
  {
    return importNode(paramNode, paramBoolean, false);
  }
  
  public Node importNode(Node paramNode, boolean paramBoolean1, boolean paramBoolean2)
  {
    Object localObject1;
    Object localObject2;
    switch (paramNode.getNodeType())
    {
    case 1: 
      Element localElement = createElementNS(paramNode.getNamespaceURI(), paramNode.getNodeName());
      localObject1 = localElement;
      if (paramNode.hasAttributes())
      {
        localObject2 = paramNode.getAttributes();
        int i = ((NamedNodeMap)localObject2).getLength();
        for (int j = 0; j < i; j++)
        {
          Attr localAttr = (Attr)((NamedNodeMap)localObject2).item(j);
          if (localAttr.getSpecified())
          {
            AbstractAttr localAbstractAttr = (AbstractAttr)importNode(localAttr, true);
            if ((paramBoolean2) && (localAbstractAttr.isId())) {
              localAbstractAttr.setIsId(false);
            }
            localElement.setAttributeNodeNS(localAbstractAttr);
          }
        }
      }
      break;
    case 2: 
      localObject1 = createAttributeNS(paramNode.getNamespaceURI(), paramNode.getNodeName());
      break;
    case 3: 
      localObject1 = createTextNode(paramNode.getNodeValue());
      paramBoolean1 = false;
      break;
    case 4: 
      localObject1 = createCDATASection(paramNode.getNodeValue());
      paramBoolean1 = false;
      break;
    case 5: 
      localObject1 = createEntityReference(paramNode.getNodeName());
      break;
    case 7: 
      localObject1 = createProcessingInstruction(paramNode.getNodeName(), paramNode.getNodeValue());
      paramBoolean1 = false;
      break;
    case 8: 
      localObject1 = createComment(paramNode.getNodeValue());
      paramBoolean1 = false;
      break;
    case 11: 
      localObject1 = createDocumentFragment();
      break;
    case 6: 
    case 9: 
    case 10: 
    default: 
      throw createDOMException((short)9, "import.node", new Object[0]);
    }
    if (paramBoolean1) {
      for (localObject2 = paramNode.getFirstChild(); localObject2 != null; localObject2 = ((Node)localObject2).getNextSibling()) {
        ((Node)localObject1).appendChild(importNode((Node)localObject2, true));
      }
    }
    return (Node)localObject1;
  }
  
  public Node cloneNode(boolean paramBoolean)
  {
    Document localDocument = (Document)newNode();
    copyInto(localDocument);
    if (paramBoolean) {
      for (Node localNode = getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        localDocument.appendChild(localDocument.importNode(localNode, paramBoolean));
      }
    }
    return localDocument;
  }
  
  public abstract boolean isId(Attr paramAttr);
  
  public Element getElementById(String paramString)
  {
    return getChildElementById(getDocumentElement(), paramString);
  }
  
  public Element getChildElementById(Node paramNode, String paramString)
  {
    if ((paramString == null) || (paramString.length() == 0)) {
      return null;
    }
    if (elementsById == null) {
      return null;
    }
    Node localNode = getRoot(paramNode);
    Object localObject1 = elementsById.get(paramString);
    if (localObject1 == null) {
      return null;
    }
    if ((localObject1 instanceof IdSoftRef))
    {
      localObject1 = ((IdSoftRef)localObject1).get();
      if (localObject1 == null)
      {
        elementsById.remove(paramString);
        return null;
      }
      localObject2 = (Element)localObject1;
      if (getRoot((Node)localObject2) == localNode) {
        return (Element)localObject2;
      }
      return null;
    }
    Object localObject2 = (List)localObject1;
    Iterator localIterator = ((List)localObject2).iterator();
    while (localIterator.hasNext())
    {
      IdSoftRef localIdSoftRef = (IdSoftRef)localIterator.next();
      localObject1 = localIdSoftRef.get();
      if (localObject1 == null)
      {
        localIterator.remove();
      }
      else
      {
        Element localElement = (Element)localObject1;
        if (getRoot(localElement) == localNode) {
          return localElement;
        }
      }
    }
    return null;
  }
  
  protected Node getRoot(Node paramNode)
  {
    Node localNode = paramNode;
    while (paramNode != null)
    {
      localNode = paramNode;
      paramNode = paramNode.getParentNode();
    }
    return localNode;
  }
  
  public void removeIdEntry(Element paramElement, String paramString)
  {
    if (paramString == null) {
      return;
    }
    if (elementsById == null) {
      return;
    }
    synchronized (elementsById)
    {
      Object localObject1 = elementsById.get(paramString);
      if (localObject1 == null) {
        return;
      }
      if ((localObject1 instanceof IdSoftRef))
      {
        elementsById.remove(paramString);
        return;
      }
      List localList = (List)localObject1;
      Iterator localIterator = localList.iterator();
      while (localIterator.hasNext())
      {
        IdSoftRef localIdSoftRef = (IdSoftRef)localIterator.next();
        localObject1 = localIdSoftRef.get();
        if (localObject1 == null)
        {
          localIterator.remove();
        }
        else if (paramElement == localObject1)
        {
          localIterator.remove();
          break;
        }
      }
      if (localList.size() == 0) {
        elementsById.remove(paramString);
      }
    }
  }
  
  public void addIdEntry(Element paramElement, String paramString)
  {
    if (paramString == null) {
      return;
    }
    if (elementsById == null)
    {
      ??? = new HashMap();
      synchronized (???)
      {
        elementsById = ((Map)???);
        elementsById.put(paramString, new IdSoftRef(paramElement, paramString));
      }
      return;
    }
    synchronized (elementsById)
    {
      ??? = elementsById.get(paramString);
      if (??? == null)
      {
        elementsById.put(paramString, new IdSoftRef(paramElement, paramString));
        return;
      }
      if ((??? instanceof IdSoftRef))
      {
        localObject4 = (IdSoftRef)???;
        Object localObject5 = ((SoftReference)localObject4).get();
        if (localObject5 == null)
        {
          elementsById.put(paramString, new IdSoftRef(paramElement, paramString));
          return;
        }
        ArrayList localArrayList = new ArrayList(4);
        ((IdSoftRef)localObject4).setList(localArrayList);
        localArrayList.add(localObject4);
        localArrayList.add(new IdSoftRef(paramElement, paramString, localArrayList));
        elementsById.put(paramString, localArrayList);
        return;
      }
      Object localObject4 = (List)???;
      ((List)localObject4).add(new IdSoftRef(paramElement, paramString, (List)localObject4));
    }
  }
  
  public void updateIdEntry(Element paramElement, String paramString1, String paramString2)
  {
    if ((paramString1 == paramString2) || ((paramString1 != null) && (paramString1.equals(paramString2)))) {
      return;
    }
    removeIdEntry(paramElement, paramString1);
    addIdEntry(paramElement, paramString2);
  }
  
  public AbstractParentNode.ElementsByTagName getElementsByTagName(Node paramNode, String paramString)
  {
    if (elementsByTagNames == null) {
      return null;
    }
    SoftDoublyIndexedTable localSoftDoublyIndexedTable = (SoftDoublyIndexedTable)elementsByTagNames.get(paramNode);
    if (localSoftDoublyIndexedTable == null) {
      return null;
    }
    return (AbstractParentNode.ElementsByTagName)localSoftDoublyIndexedTable.get(null, paramString);
  }
  
  public void putElementsByTagName(Node paramNode, String paramString, AbstractParentNode.ElementsByTagName paramElementsByTagName)
  {
    if (elementsByTagNames == null) {
      elementsByTagNames = new WeakHashMap(11);
    }
    SoftDoublyIndexedTable localSoftDoublyIndexedTable = (SoftDoublyIndexedTable)elementsByTagNames.get(paramNode);
    if (localSoftDoublyIndexedTable == null) {
      elementsByTagNames.put(paramNode, localSoftDoublyIndexedTable = new SoftDoublyIndexedTable());
    }
    localSoftDoublyIndexedTable.put(null, paramString, paramElementsByTagName);
  }
  
  public AbstractParentNode.ElementsByTagNameNS getElementsByTagNameNS(Node paramNode, String paramString1, String paramString2)
  {
    if (elementsByTagNamesNS == null) {
      return null;
    }
    SoftDoublyIndexedTable localSoftDoublyIndexedTable = (SoftDoublyIndexedTable)elementsByTagNamesNS.get(paramNode);
    if (localSoftDoublyIndexedTable == null) {
      return null;
    }
    return (AbstractParentNode.ElementsByTagNameNS)localSoftDoublyIndexedTable.get(paramString1, paramString2);
  }
  
  public void putElementsByTagNameNS(Node paramNode, String paramString1, String paramString2, AbstractParentNode.ElementsByTagNameNS paramElementsByTagNameNS)
  {
    if (elementsByTagNamesNS == null) {
      elementsByTagNamesNS = new WeakHashMap(11);
    }
    SoftDoublyIndexedTable localSoftDoublyIndexedTable = (SoftDoublyIndexedTable)elementsByTagNamesNS.get(paramNode);
    if (localSoftDoublyIndexedTable == null) {
      elementsByTagNamesNS.put(paramNode, localSoftDoublyIndexedTable = new SoftDoublyIndexedTable());
    }
    localSoftDoublyIndexedTable.put(paramString1, paramString2, paramElementsByTagNameNS);
  }
  
  public Event createEvent(String paramString)
    throws DOMException
  {
    if (documentEventSupport == null) {
      documentEventSupport = ((AbstractDOMImplementation)implementation).createDocumentEventSupport();
    }
    return documentEventSupport.createEvent(paramString);
  }
  
  public NodeIterator createNodeIterator(Node paramNode, int paramInt, NodeFilter paramNodeFilter, boolean paramBoolean)
    throws DOMException
  {
    if (traversalSupport == null) {
      traversalSupport = new TraversalSupport();
    }
    return traversalSupport.createNodeIterator(this, paramNode, paramInt, paramNodeFilter, paramBoolean);
  }
  
  public TreeWalker createTreeWalker(Node paramNode, int paramInt, NodeFilter paramNodeFilter, boolean paramBoolean)
    throws DOMException
  {
    return TraversalSupport.createTreeWalker(this, paramNode, paramInt, paramNodeFilter, paramBoolean);
  }
  
  public void detachNodeIterator(NodeIterator paramNodeIterator)
  {
    traversalSupport.detachNodeIterator(paramNodeIterator);
  }
  
  public void nodeToBeRemoved(Node paramNode)
  {
    if (traversalSupport != null) {
      traversalSupport.nodeToBeRemoved(paramNode);
    }
  }
  
  protected AbstractDocument getCurrentDocument()
  {
    return this;
  }
  
  protected Node export(Node paramNode, Document paramDocument)
  {
    throw createDOMException((short)9, "import.document", new Object[0]);
  }
  
  protected Node deepExport(Node paramNode, Document paramDocument)
  {
    throw createDOMException((short)9, "import.document", new Object[0]);
  }
  
  protected Node copyInto(Node paramNode)
  {
    super.copyInto(paramNode);
    AbstractDocument localAbstractDocument = (AbstractDocument)paramNode;
    implementation = implementation;
    localizableSupport = new LocalizableSupport("org.apache.batik.dom.resources.Messages", getClass().getClassLoader());
    return paramNode;
  }
  
  protected Node deepCopyInto(Node paramNode)
  {
    super.deepCopyInto(paramNode);
    AbstractDocument localAbstractDocument = (AbstractDocument)paramNode;
    implementation = implementation;
    localizableSupport = new LocalizableSupport("org.apache.batik.dom.resources.Messages", getClass().getClassLoader());
    return paramNode;
  }
  
  protected void checkChildType(Node paramNode, boolean paramBoolean)
  {
    int i = paramNode.getNodeType();
    switch (i)
    {
    case 1: 
    case 7: 
    case 8: 
    case 10: 
    case 11: 
      break;
    case 2: 
    case 3: 
    case 4: 
    case 5: 
    case 6: 
    case 9: 
    default: 
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(i), paramNode.getNodeName() });
    }
    if (((!paramBoolean) && (i == 1) && (getDocumentElement() != null)) || ((i == 10) && (getDoctype() != null))) {
      throw createDOMException((short)3, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(i), paramNode.getNodeName() });
    }
  }
  
  private void writeObject(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.defaultWriteObject();
    paramObjectOutputStream.writeObject(implementation.getClass().getName());
  }
  
  private void readObject(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    paramObjectInputStream.defaultReadObject();
    localizableSupport = new LocalizableSupport("org.apache.batik.dom.resources.Messages", getClass().getClassLoader());
    Class localClass = Class.forName((String)paramObjectInputStream.readObject());
    try
    {
      Method localMethod = localClass.getMethod("getDOMImplementation", null);
      implementation = ((DOMImplementation)localMethod.invoke(null, null));
    }
    catch (Exception localException1)
    {
      try
      {
        implementation = ((DOMImplementation)localClass.newInstance());
      }
      catch (Exception localException2) {}
    }
  }
  
  public abstract Attr createAttributeNS(String paramString1, String paramString2)
    throws DOMException;
  
  public abstract Element createElementNS(String paramString1, String paramString2)
    throws DOMException;
  
  public abstract EntityReference createEntityReference(String paramString)
    throws DOMException;
  
  public abstract Attr createAttribute(String paramString)
    throws DOMException;
  
  public abstract ProcessingInstruction createProcessingInstruction(String paramString1, String paramString2)
    throws DOMException;
  
  public abstract CDATASection createCDATASection(String paramString)
    throws DOMException;
  
  public abstract Comment createComment(String paramString);
  
  public abstract Text createTextNode(String paramString);
  
  public abstract DocumentFragment createDocumentFragment();
  
  public abstract Element createElement(String paramString)
    throws DOMException;
  
  protected class IdSoftRef
    extends CleanerThread.SoftReferenceCleared
  {
    String id;
    List list;
    
    IdSoftRef(Object paramObject, String paramString)
    {
      super();
      id = paramString;
    }
    
    IdSoftRef(Object paramObject, String paramString, List paramList)
    {
      super();
      id = paramString;
      list = paramList;
    }
    
    public void setList(List paramList)
    {
      list = paramList;
    }
    
    public void cleared()
    {
      if (elementsById == null) {
        return;
      }
      synchronized (elementsById)
      {
        if (list != null)
        {
          list.remove(this);
        }
        else
        {
          Object localObject1 = elementsById.remove(id);
          if (localObject1 != this) {
            elementsById.put(id, localObject1);
          }
        }
      }
    }
  }
}

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

import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Node;

public abstract class AbstractDocumentFragment
  extends AbstractParentNode
  implements DocumentFragment
{
  public String getNodeName()
  {
    return "#document-fragment";
  }
  
  public short getNodeType()
  {
    return 11;
  }
  
  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.AbstractDocumentFragment
 * 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;

public class AbstractElement$Entry
  implements Serializable
{
  public int hash;
  public String namespaceURI;
  public String name;
  public Node value;
  public Entry next;
  
  public AbstractElement$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);
  }
}

/* Location:
 * Qualified Name:     org.apache.batik.dom.AbstractElement.Entry
 * 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.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;

public class AbstractElement$NamedNodeHashMap
  implements NamedNodeMap, Serializable
{
  protected static final int INITIAL_CAPACITY = 3;
  protected AbstractElement.Entry[] table;
  protected int count;
  private final AbstractElement this$0;
  
  public AbstractElement$NamedNodeHashMap(AbstractElement paramAbstractElement)
  {
    this$0 = paramAbstractElement;
    table = new AbstractElement.Entry[3];
  }
  
  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;
  }
  
  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-2017. Infinite Loop Ltd