1/* 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23package com.sun.org.apache.xerces.internal.dom; 24 25import org.w3c.dom.Document; 26import org.w3c.dom.Node; 27import org.w3c.dom.DOMImplementation; 28 29public class DocumentImpl implements Document, Node { 30 31 public short getNodeType() { 32 return 9; //DOCUMENT_NODE = 9 33 } 34 35 public org.w3c.dom.Document getOwnerDocument() { 36 return null; 37 } 38 39 public Node getFirstChild() { 40 return null; 41 } 42 43 public String getPrefix() { 44 return "TestPrefix"; 45 } 46 47 public String getLocalName() { 48 return "LocalName"; 49 } 50 51 public boolean hasAttributes() { 52 return false; 53 } 54 55 public Node renameNode(Node n, String namespaceURI, String name) { 56 return n; 57 } 58 59 public org.w3c.dom.DocumentType getDoctype() { 60 return null; 61 } 62 63 public DOMImplementation getImplementation() { 64 return DOMImplementationImpl.getDOMImplementation(); 65 } 66 67} 68