1 /* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.harmony.xml.dom; 18 19 import org.w3c.dom.Entity; 20 import org.w3c.dom.Node; 21 22 /** 23 * Provides a straightforward implementation of the corresponding W3C DOM 24 * interface. The class is used internally only, thus only notable members that 25 * are not in the original interface are documented (the W3C docs are quite 26 * extensive). Hope that's ok. 27 * <p> 28 * Some of the fields may have package visibility, so other classes belonging to 29 * the DOM implementation can easily access them while maintaining the DOM tree 30 * structure. 31 */ 32 public class EntityImpl extends NodeImpl implements Entity { 33 34 private String notationName; 35 36 private String publicID; 37 38 private String systemID; 39 EntityImpl(DocumentImpl document, String notationName, String publicID, String systemID)40 EntityImpl(DocumentImpl document, String notationName, String publicID, 41 String systemID) { 42 super(document); 43 this.notationName = notationName; 44 this.publicID = publicID; 45 this.systemID = systemID; 46 } 47 48 @Override getNodeName()49 public String getNodeName() { 50 return getNotationName(); 51 } 52 53 @Override getNodeType()54 public short getNodeType() { 55 return Node.ENTITY_NODE; 56 } 57 getNotationName()58 public String getNotationName() { 59 return notationName; 60 } 61 getPublicId()62 public String getPublicId() { 63 return publicID; 64 } 65 getSystemId()66 public String getSystemId() { 67 return systemID; 68 } 69 getInputEncoding()70 public String getInputEncoding() { 71 throw new UnsupportedOperationException(); // TODO 72 } 73 getXmlEncoding()74 public String getXmlEncoding() { 75 throw new UnsupportedOperationException(); // TODO 76 } 77 getXmlVersion()78 public String getXmlVersion() { 79 throw new UnsupportedOperationException(); // TODO 80 } 81 } 82