oracle.xml.parser.v2
Class XMLEntity

oracle.xml.parser.v2.XMLEntity

public class XMLEntity
implements Entity, java.io.Externalizable

This class implements the DOM Entity interface and represens an XML internal or external entity as defined in the XML Document Type Definition (DTD).

See Also:
Serialized Form

Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
XMLEntity()
          Default constructor.
 
Method Summary
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 short getNodeType()
          Gets a code representing the type of the underlying object
 java.lang.String getNodeValue()
          Gets the value of this node, depending on its type
 java.lang.String getNotationName()
          For unparsed entities, gets the name of the notation for the entity.
 Node getParentNode()
          Gets the parent of this node.
 java.lang.String getPublicId()
          Gets the public identifier associated with the entity, if specified.
 java.lang.String getSystemId()
          Gets the system identifier associated with the entity, if specified.
 void readExternal(java.io.ObjectInput inArg)
          This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
 void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
          This method reads the content of XMLEntity
 void setNodeValue(java.lang.String arg)
          Sets the value of entity.
 void writeExternal(java.io.ObjectOutput outArg)
          This method saves the state of the object by creating a binray compressed stream with information about this object.
 

Constructor Detail

XMLEntity

public XMLEntity()
Default constructor. Note that this constructor is used only during deserialization/decompression of this DOM node. In order to deserialize this node to construct the DOM node from the serialized/ compressed stream, it is required to create a handle of the object.
Method Detail

getNodeType

public short getNodeType()
Gets a code representing the type of the underlying object
Returns:
type of the node

getNodeValue

public java.lang.String getNodeValue()
                              throws DOMException
Gets the value of this node, depending on its type
Returns:
Value of this node
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getPublicId

public java.lang.String getPublicId()
Gets the public identifier associated with the entity, if specified. If the public identifier was not specified, this is null.
Specified by:
getPublicId in interface Entity
Returns:
The public identifier

getSystemId

public java.lang.String getSystemId()
Gets the system identifier associated with the entity, if specified. If the system identifier was not specified, this is null.
Specified by:
getSystemId in interface Entity
Returns:
The system identifier

getNotationName

public java.lang.String getNotationName()
For unparsed entities, gets the name of the notation for the entity. For parsed entities, this is null.
Specified by:
getNotationName in interface Entity
Returns:
The notation name

getParentNode

public Node getParentNode()
Gets the parent of this node. All nodes, except Document, DocumentFragment, and Attr may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.
Returns:
The parent of this node

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

setNodeValue

public void setNodeValue(java.lang.String arg)
Sets the value of entity.
Parameters:
arg - The new value of the entity.

writeExternal

public void writeExternal(java.io.ObjectOutput outArg)
                   throws java.io.IOException
This method saves the state of the object by creating a binray compressed stream with information about this object.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - The ObjectOutput stream used to write the serialized/ compressed stream.
Throws:
java.io.IOException - is thrown when there is an exception while writing the serialized/compressed stream.

readExternal

public void readExternal(java.io.ObjectInput inArg)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException,
                         java.io.EOFException
This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - the ObjectInput stream used for reading the compressed stream.
Throws:
java.io.IOException - is thrown when there is an error in reading the input stream.
java.lang.ClassNotFoundException - is thrown when the class is not found.

readExternal

public void readExternal(oracle.xml.io.XMLObjectInput in,
                         oracle.xml.comp.CXMLContext cxmlContext)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
This method reads the content of XMLEntity
Parameters:
in - XMLObjectInput the input stream
inp - the byte which is already read is passed to this function
cxmlContext - the serialization object content information


 

Copyright © 1997, 2004, Oracle. All rights reserved.