001/*
002 * Copyright (c) 2000 World Wide Web Consortium,
003 * (Massachusetts Institute of Technology, Institut National de
004 * Recherche en Informatique et en Automatique, Keio University). All
005 * Rights Reserved. This program is distributed under the W3C's Software
006 * Intellectual Property License. This program is distributed in the
007 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009 * PURPOSE.
010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011 */
012
013package org.w3c.dom;
014
015/**
016 * This interface represents an entity, either parsed or unparsed, in an XML 
017 * document. Note that this models the entity itself not the entity 
018 * declaration. <code>Entity</code> declaration modeling has been left for a 
019 * later Level of the DOM specification.
020 * <p>The <code>nodeName</code> attribute that is inherited from 
021 * <code>Node</code> contains the name of the entity.
022 * <p>An XML processor may choose to completely expand entities before the 
023 * structure model is passed to the DOM; in this case there will be no 
024 * <code>EntityReference</code> nodes in the document tree.
025 * <p>XML does not mandate that a non-validating XML processor read and 
026 * process entity declarations made in the external subset or declared in 
027 * external parameter entities. This means that parsed entities declared in 
028 * the external subset need not be expanded by some classes of applications, 
029 * and that the replacement value of the entity may not be available. When 
030 * the replacement value is available, the corresponding <code>Entity</code> 
031 * node's child list represents the structure of that replacement text. 
032 * Otherwise, the child list is empty.
033 * <p>The DOM Level 2 does not support editing <code>Entity</code> nodes; if a 
034 * user wants to make changes to the contents of an <code>Entity</code>, 
035 * every related <code>EntityReference</code> node has to be replaced in the 
036 * structure model by a clone of the <code>Entity</code>'s contents, and 
037 * then the desired changes must be made to each of those clones instead. 
038 * <code>Entity</code> nodes and all their descendants are readonly.
039 * <p>An <code>Entity</code> node does not have any parent.If the entity 
040 * contains an unbound namespace prefix, the <code>namespaceURI</code> of 
041 * the corresponding node in the <code>Entity</code> node subtree is 
042 * <code>null</code>. The same is true for <code>EntityReference</code> 
043 * nodes that refer to this entity, when they are created using the 
044 * <code>createEntityReference</code> method of the <code>Document</code> 
045 * interface. The DOM Level 2 does not support any mechanism to resolve 
046 * namespace prefixes.
047 * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
048 */
049public interface Entity extends Node {
050    /**
051     * The public identifier associated with the entity, if specified. If the 
052     * public identifier was not specified, this is <code>null</code>.
053     */
054    public String getPublicId();
055
056    /**
057     * The system identifier associated with the entity, if specified. If the 
058     * system identifier was not specified, this is <code>null</code>.
059     */
060    public String getSystemId();
061
062    /**
063     * For unparsed entities, the name of the notation for the entity. For 
064     * parsed entities, this is <code>null</code>. 
065     */
066    public String getNotationName();
067
068}