org.ozoneDB.xml.dom
Class NotationImpl

java.lang.Object
  extended byorg.ozoneDB.OzoneObject
      extended byorg.ozoneDB.xml.dom.NodeImpl
          extended byorg.ozoneDB.xml.dom.NotationImpl
All Implemented Interfaces:
java.io.Externalizable, org.w3c.dom.Node, NodeProxy, org.w3c.dom.Notation, NotationProxy, org.ozoneDB.OzoneCompatible, org.ozoneDB.OzoneCompatibleOrProxy, org.ozoneDB.OzoneRemote, java.io.Serializable

public final class NotationImpl
extends NodeImpl
implements NotationProxy

Implements a notation. A notation node merely associates the notation's name with its system and/or public identifiers. The notation has no contents. This node is immutable.

Notes:

  1. Node type is Node.NOTATION_NODE
  2. Node does not support childern
  3. Node does not have a value
  4. Node only accessible from DocumentType

Version:
$Revision: 1.2 $ $Date: 2003/11/20 23:18:42 $
Author:
Assaf Arkin
See Also:
Notation, NodeImpl, Serialized Form

Field Summary
 
Fields inherited from class org.ozoneDB.xml.dom.NodeImpl
ATTLIST_DECL_NODE, ELEMENT_DECL_NODE, PARAM_ENTITY_NODE
 
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
NotationImpl()
           
NotationImpl(DocumentImpl owner, java.lang.String name, java.lang.String systemID, java.lang.String publicID)
          Constructor requires owner document, notation name and all its attributes.
 
Method Summary
 java.lang.Object clone()
           
 void cloneInto(NodeProxy 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.
 org.w3c.dom.Node cloneNode(boolean deep)
           
 boolean equals(java.lang.Object other)
           
 short getNodeType()
          Abstract method must be implemented by each node class.
 java.lang.String getPublicId()
           
 java.lang.String getSystemId()
           
 void init(DocumentProxy owner, java.lang.String name, java.lang.String systemID, java.lang.String publicID)
           
 void setNodeValue(java.lang.String value)
          Changes the value of the node.
 void setPublicId(java.lang.String publicID)
           
 void setSystemId(java.lang.String systemID)
           
protected  boolean supportsChildern()
           
 java.lang.String toString()
           
 
Methods inherited from class org.ozoneDB.xml.dom.NodeImpl
appendChild, castNewChild, castOldChild, getAttributes, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, init, insertBefore, isReadOnly, isSupported, normalize, notifyIterators, readExternal, removeChild, replaceChild, setNextSibling, setNodeName, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setReadOnly, supports, writeExternal
 
Methods inherited from class org.ozoneDB.OzoneObject
container, database, deleteRecursive, getHandle, getObjectID, handle, hashCode, onActivate, onCreate, onDelete, onPassivate, requireWriteLocking, self, setContainer, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ozoneDB.OzoneCompatibleOrProxy
getObjectID
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix
 
Methods inherited from interface org.ozoneDB.xml.dom.NodeProxy
getChild, getChildCount, getChildNodes, init, isReadOnly, setNextSibling, setNodeName, setOwnerDocument, setParentNode, setPreviousSibling, setReadOnly
 

Constructor Detail

NotationImpl

public NotationImpl(DocumentImpl owner,
                    java.lang.String name,
                    java.lang.String systemID,
                    java.lang.String publicID)
Constructor requires owner document, notation name and all its attributes.

Parameters:
owner - The owner document
name - The entity name
systemID - The system identifier, if specified
publicID - The public identifier, if specified

NotationImpl

public NotationImpl()
Method Detail

getNodeType

public short getNodeType()
Description copied from class: NodeImpl
Abstract method must be implemented by each node class.

Specified by:
getNodeType in interface org.w3c.dom.Node
Specified by:
getNodeType in class NodeImpl
See Also:
Node.getNodeType()

setNodeValue

public final void setNodeValue(java.lang.String value)
Description copied from class: NodeImpl
Changes the value of the node. Not all node types support the notion of a value. If the value is not supported by a particular node type, it will throw an exception when calling this method. The following table specifies which node types support values:
 Element                  Not supported
 Attr                     Value supported
 Text                     Value supported
 CDATASection             Value supported
 EntityReference          Not supported
 Entity                   Not supported
 ProcessingInstruction    Value supported
 Comment                  Value supported
 Document                 Not supported
 DocumentType             Not supported
 DocumentFragment         Not supported
 Notation                 Not supported
 
For most node types, if the value is set to null, NodeImpl.getNodeValue() will return an empty string instead.

Specified by:
setNodeValue in interface org.w3c.dom.Node
Overrides:
setNodeValue in class NodeImpl
Parameters:
value - New value of node

getPublicId

public java.lang.String getPublicId()
Specified by:
getPublicId in interface org.w3c.dom.Notation

setPublicId

public void setPublicId(java.lang.String publicID)
Specified by:
setPublicId in interface NotationProxy

getSystemId

public java.lang.String getSystemId()
Specified by:
getSystemId in interface org.w3c.dom.Notation

setSystemId

public void setSystemId(java.lang.String systemID)
Specified by:
setSystemId in interface NotationProxy

equals

public boolean equals(java.lang.Object other)

clone

public final java.lang.Object clone()

cloneNode

public final org.w3c.dom.Node cloneNode(boolean deep)
Specified by:
cloneNode in interface org.w3c.dom.Node

toString

public java.lang.String toString()

cloneInto

public void cloneInto(NodeProxy into,
                      boolean deep)
Description copied from class: NodeImpl
This clone method is called after a new node has been constructed to copy the contents of this node into the new one. It clones in contents but not in context, and guarantees that the cloned node will pass the equality test (see OzoneObject.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.

Specified by:
cloneInto in interface NodeProxy
Overrides:
cloneInto in class NodeImpl
Parameters:
into - A node into which to duplicate this one
deep - True if deep cloning is required

supportsChildern

protected final boolean supportsChildern()
Returns:
True if childern supported by this node type

init

public void init(DocumentProxy owner,
                 java.lang.String name,
                 java.lang.String systemID,
                 java.lang.String publicID)
Specified by:
init in interface NotationProxy


Copyright © 2004 The Ozone Database Project - www.ozone-db.org. All Rights Reserved.