NodeImpl.java 4.62 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa.dom;

import com.adobe.xfa.dom.DocumentImpl;
import com.adobe.xfa.dom.ParentNode;
import org.w3c.dom.*;

abstract class NodeImpl
implements Node {
    static final String COMMENT_NODE_NAME = "#comment";
    static final String DOCUMENT_NODE_NAME = "#document";
    static final String TEXT_NODE_NAME = "#text";
    static final boolean DO_DEBUG = false;
    private final ParentNode mParent;
    private NodeImpl mPrev;
    private NodeImpl mNext;
    private final DocumentImpl mDocument;
    final int mNodeID;
    static int gNodeIDCounter = 0;

    NodeImpl(ParentNode parent) {
        this.mParent = parent;
        DocumentImpl document = null;
        if (parent != null) {
            document = parent instanceof DocumentImpl ? (DocumentImpl)parent : parent.getDocument();
        }
        this.mDocument = document;
        this.mNodeID = ++gNodeIDCounter;
    }

    @Override
    public Node appendChild(Node newChild) throws DOMException {
        throw new DOMException(7, "");
    }

    @Override
    public Node cloneNode(boolean deep) {
        throw new DOMException(9, "");
    }

    @Override
    public short compareDocumentPosition(Node other) throws DOMException {
        return 32;
    }

    @Override
    public NamedNodeMap getAttributes() {
        return null;
    }

    @Override
    public String getBaseURI() {
        return null;
    }

    @Override
    public NodeList getChildNodes() {
        return null;
    }

    @Override
    public Object getFeature(String feature, String version) {
        return null;
    }

    @Override
    public Node getFirstChild() {
        return null;
    }

    @Override
    public Node getLastChild() {
        return null;
    }

    @Override
    public String getLocalName() {
        return null;
    }

    @Override
    public String getNamespaceURI() {
        return null;
    }

    @Override
    public Node getNextSibling() {
        return null;
    }

    @Override
    public String getNodeValue() throws DOMException {
        return null;
    }

    @Override
    public Document getOwnerDocument() {
        return this.mDocument;
    }

    @Override
    public Node getParentNode() {
        return this.mParent;
    }

    @Override
    public String getPrefix() {
        return null;
    }

    @Override
    public Node getPreviousSibling() {
        return null;
    }

    @Override
    public String getTextContent() throws DOMException {
        return null;
    }

    @Override
    public Object getUserData(String key) {
        return null;
    }

    @Override
    public boolean hasAttributes() {
        return false;
    }

    @Override
    public boolean hasChildNodes() {
        return false;
    }

    @Override
    public Node insertBefore(Node newChild, Node refChild) throws DOMException {
        throw new DOMException(3, "");
    }

    @Override
    public boolean isDefaultNamespace(String namespaceURI) {
        return this.mParent == null ? false : this.mParent.isDefaultNamespace(namespaceURI);
    }

    @Override
    public boolean isSupported(String feature, String version) {
        return false;
    }

    @Override
    public String lookupNamespaceURI(String prefix) {
        return this.mParent == null ? null : this.mParent.lookupNamespaceURI(prefix);
    }

    @Override
    public String lookupPrefix(String namespaceURI) {
        return this.mParent == null ? null : this.mParent.lookupPrefix(namespaceURI);
    }

    @Override
    public void normalize() {
    }

    @Override
    public Node removeChild(Node oldCcild) throws DOMException {
        return null;
    }

    @Override
    public Node replaceChild(Node oldChild, Node newChild) throws DOMException {
        throw new DOMException(3, "");
    }

    @Override
    public void setNodeValue(String newValue) throws DOMException {
    }

    @Override
    public void setPrefix(String prefix) throws DOMException {
    }

    @Override
    public void setTextContent(String textContent) throws DOMException {
    }

    @Override
    public Object setUserData(String key, Object data, UserDataHandler handler) {
        return null;
    }

    final DocumentImpl getDocument() {
        return this.mDocument == null && this instanceof DocumentImpl ? (DocumentImpl)this : this.mDocument;
    }

    final ParentNode getParent() {
        return this.mParent;
    }

    final NodeImpl getNext() {
        return this.mNext;
    }

    final void setNext(NodeImpl newNext) {
        this.mNext = newNext;
    }

    final NodeImpl getPrev() {
        return this.mPrev;
    }

    final void setPrev(NodeImpl newPrev) {
        this.mPrev = newPrev;
    }
}