public class EntityImpl extends NodeImpl implements Entity
Notes:
Node.ENTITY_NODE
DocumentType
Entity,
NodeImpl| Modifier and Type | Field and Description |
|---|---|
protected String |
_notation
The notation of this entity, if specified.
|
protected String |
_publicID
The public identifier of this entity, if specified.
|
protected String |
_systemID
The system identifier of this entity, if specified.
|
static short |
STATE_DECLARED
Entity has been declared but not parsed.
|
static short |
STATE_NOT_FOUND
Entity not found.
|
static short |
STATE_PARSED
Entity has been parsed.
|
static short |
STATE_PARSING
Entity is being parsed.
|
ATTLIST_DECL_NODE, ELEMENT_DECL_NODE, PARAM_ENTITY_NODEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
EntityImpl(String name,
String internalValue)
Constructs an internal general entity.
|
EntityImpl(String name,
String systemID,
String publicID)
Constructs an external general entity.
|
EntityImpl(String name,
String systemID,
String publicID,
String notation)
Constructs an unparsed general entity.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
protected void |
cloneInto(NodeImpl into,
boolean deep)
This clone method is called after a new node has been constructed to
copy the contents of this node into the new one.
|
Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(Node other) |
boolean |
equals(Object other)
Returns true if this node and other are identical by content but
not context.
|
String |
getBaseURI() |
String |
getEncoding()
DOM Level 3 WD - experimental
the encoding of this entity, when it is an external parsed entity.
|
Object |
getFeature(String feature,
String version) |
String |
getInputEncoding() |
String |
getInternal() |
short |
getNodeType()
Abstract method must be implemented by each node class.
|
String |
getNotationName() |
String |
getPublicId() |
short |
getState()
Returns the parsing state of this entity.
|
String |
getSystemId() |
String |
getTextContent() |
Object |
getUserData(String key) |
String |
getVersion()
DOM Level 3 WD - experimental
the version number of this entity, when it is an external parsed entity.
|
String |
getXmlEncoding() |
String |
getXmlVersion() |
boolean |
hasAttributes() |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
boolean |
isInternal()
Returns true if entity is an internal general entity.
|
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version) |
boolean |
isUnparsed()
Returns true if entity is an unparsed general entity.
|
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
setEncoding(String value)
DOM Level 3 WD - experimental
encoding - An attribute specifying, as part of the text declaration,
the encoding of this entity, when it is an external parsed entity.
|
void |
setNodeValue(String value)
Changes the value of the node.
|
void |
setState(short newState)
Changes the parsing state of this entity.
|
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
void |
setVersion(String value)
DOM Level 3 WD - experimental
version - An attribute specifying, as part of the text declaration,
the version number of this entity, when it is an external parsed entity.
|
String |
toString() |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, insertBefore, isReadOnly, makeReadOnly, normalize, removeChild, replaceChild, setOwnerDocument, setPrefix, supportsfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setPrefixprotected String _notation
protected String _systemID
protected String _publicID
public static final short STATE_DECLARED
public static final short STATE_PARSING
public static final short STATE_PARSED
public static final short STATE_NOT_FOUND
public EntityImpl(String name, String systemID, String publicID, String notation)
name - The entity namesystemID - The system identifierpublicID - The public identifier, if specifiednotation - The notation, if specifiedpublic EntityImpl(String name, String systemID, String publicID)
name - The entity namesystemID - The system identifierpublicID - The public identifier, if specifiedpublic short getNodeType()
NodeImplgetNodeType in interface NodegetNodeType in class NodeImplNode.getNodeType()public final void setNodeValue(String value)
NodeImplElement Not supported Attr Supported Text Supported CDATASection Supported EntityReference Not supported Entity Not supported ProcessingInstruction Supported Comment Supported Document Not supported DocumentType Not supported DocumentFragment Not supported Notation Not supportedFor most node types, if the value is set to null,
NodeImpl.getNodeValue()
will return an empty string instead.setNodeValue in interface NodesetNodeValue in class NodeImplvalue - New value of nodepublic String getPublicId()
getPublicId in interface Entitypublic String getSystemId()
getSystemId in interface Entitypublic String getNotationName()
getNotationName in interface Entitypublic final String getInternal()
public String getEncoding()
public String getVersion()
public void setVersion(String value)
public void setEncoding(String value)
public boolean isUnparsed()
public boolean isInternal()
If true is returned, then getInternal() will return a string
(might be empty).
public short getState()
public void setState(short newState)
newState - New state of entitypublic boolean equals(Object other)
NodeImplNodeImpl.equals(java.lang.Object) on each pair
Note that for large document roots, the equality operation can be very expensive.
protected void cloneInto(NodeImpl into, boolean deep)
NodeImplNodeImpl.equals(java.lang.Object)).
into must be a valid node of the exact same class as this one. deep is true if deep cloning (includes all children nodes) is to be performed. If deep is false, the clone might not pass the equality test.
Derived classes override and call this method to add per-class variable
copying. This method is called by Node.cloneNode(boolean) and the default
Object.clone() method.
Contents cloning duplicates the node's name and value, and its children. It does not duplicate it's context, that is, the node's parent or sibling. Initially a clone node has no parents or siblings. However, the node does belong to the same document, since all nodes must belong to some document. The cloned node is never read-only.
public String getInputEncoding()
getInputEncoding in interface Entitypublic String getXmlEncoding()
getXmlEncoding in interface Entitypublic String getXmlVersion()
getXmlVersion in interface Entitypublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface NodeDOMExceptionpublic String getBaseURI()
getBaseURI in interface Nodepublic Object getFeature(String feature, String version)
getFeature in interface Nodepublic String getTextContent() throws DOMException
getTextContent in interface NodeDOMExceptionpublic Object getUserData(String key)
getUserData in interface Nodepublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface Nodepublic boolean isEqualNode(Node arg)
isEqualNode in interface Nodepublic boolean isSameNode(Node other)
isSameNode in interface Nodepublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface Nodepublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface Nodepublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodeDOMExceptionpublic Object setUserData(String key, Object data, UserDataHandler handler)
setUserData in interface Nodepublic boolean hasAttributes()
hasAttributes in interface Nodepublic boolean isSupported(String feature, String version)
isSupported in interface NodePhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.