org.ozoneDB.xml.dom
Class ParamEntity

java.lang.Object
  |
  +--org.ozoneDB.OzoneObject
        |
        +--org.ozoneDB.xml.dom.NodeImpl
              |
              +--org.ozoneDB.xml.dom.ParamEntity
All Implemented Interfaces:
java.io.Externalizable, org.w3c.dom.Node, NodeProxy, org.ozoneDB.OzoneCompatible, org.ozoneDB.OzoneCompatibleOrProxy, org.ozoneDB.OzoneRemote, ParamEntityProxy, java.io.Serializable

public class ParamEntity
extends NodeImpl
implements ParamEntityProxy

Implements a parameter entity.

Notes:

  1. Node type is NodeImpl.PARAM_ENTITY_NODE
  2. Node supports childern
  3. Node does not have a value
  4. Node only accessible from DocumentType

Version:
$Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
Author:
Assaf Arkin
See Also:
NodeImpl, Serialized Form

Field Summary
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.
 
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
ParamEntity()
           
ParamEntity(DocumentImpl owner, java.lang.String name, java.lang.String internalValue)
          Constructs an internal parameter entity.
ParamEntity(DocumentImpl owner, java.lang.String name, java.lang.String systemId, java.lang.String publicId)
          Constructs an external parameter entity.
 
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)
           
 java.lang.String getInternal()
           
 short getNodeType()
          Abstract method must be implemented by each node class.
 java.lang.String getPublicId()
           
 short getState()
          Returns the parsing state of this entity.
 java.lang.String getSystemId()
           
 void init(DocumentProxy owner, java.lang.String name)
           
 void init(DocumentProxy owner, java.lang.String name, java.lang.String value)
           
 void init(DocumentProxy owner, java.lang.String name, java.lang.String systemId, java.lang.String publicId)
           
 boolean isInternal()
          Returns true if entity is an internal entity.
 void setInternal(java.lang.String internalValue)
           
 void setPublicId(java.lang.String publicId)
           
 void setState(short newState)
          Changes the parsing state of this entity.
 void setSystemId(java.lang.String systemId)
           
 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, setNodeValue, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setReadOnly, supports, writeExternal
 
Methods inherited from class org.ozoneDB.OzoneObject
container, database, deleteRecursive, getObjectID, handle, hashCode, onCreate, onDelete, 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.ozoneDB.xml.dom.NodeProxy
getChild, getChildCount, getChildNodes, init, isReadOnly, setNextSibling, setNodeName, setOwnerDocument, setParentNode, setPreviousSibling, setReadOnly
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

STATE_DECLARED

public static final short STATE_DECLARED
Entity has been declared but not parsed. This is the initial state for an entity after it has been declared in the DTD but before it is used in the document contents.

See Also:
Constant Field Values

STATE_PARSING

public static final short STATE_PARSING
Entity is being parsed. This state designates that the entity is being parsed right now. State is used to identify circular references.

See Also:
Constant Field Values

STATE_PARSED

public static final short STATE_PARSED
Entity has been parsed. This state indicates that entity has been parsed and it's parsed contents is contained in its child nodes.

See Also:
Constant Field Values

STATE_NOT_FOUND

public static final short STATE_NOT_FOUND
Entity not found. The entity could not be parsed before.

See Also:
Constant Field Values
Constructor Detail

ParamEntity

public ParamEntity(DocumentImpl owner,
                   java.lang.String name,
                   java.lang.String systemId,
                   java.lang.String publicId)
Constructs an external parameter entity. Entity system identifier must be provided, public identifier is optional.

Parameters:
owner - The owner document
name - The entity name
systemId - The system identifier
publicId - The public identifier, if specified

ParamEntity

public ParamEntity(DocumentImpl owner,
                   java.lang.String name,
                   java.lang.String internalValue)
Constructs an internal parameter entity. Entity value must be provided.

Parameters:
owner - The owner document
name - The entity name
internalValue - The unparsed entity value

ParamEntity

public ParamEntity()
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()

getPublicId

public java.lang.String getPublicId()
Specified by:
getPublicId in interface ParamEntityProxy

setPublicId

public void setPublicId(java.lang.String publicId)
Specified by:
setPublicId in interface ParamEntityProxy

getSystemId

public java.lang.String getSystemId()
Specified by:
getSystemId in interface ParamEntityProxy

setSystemId

public void setSystemId(java.lang.String systemId)
Specified by:
setSystemId in interface ParamEntityProxy

isInternal

public boolean isInternal()
Returns true if entity is an internal entity. An internal entity is one for which a value has been defined. An external entity is one for which an external entity has been assigned through either system or public identifiers.

Specified by:
isInternal in interface ParamEntityProxy
Returns:
True if internal entity

getState

public short getState()
Returns the parsing state of this entity.

Returns:
State of entity

setState

public void setState(short newState)
Changes the parsing state of this entity. Note that only some changes are allowed: from declared to parsing, parsed or not found; from parsing to parsed or not found; from not found to declared.

Specified by:
setState in interface ParamEntityProxy
Parameters:
newState - New state of entity

getInternal

public final java.lang.String getInternal()
Specified by:
getInternal in interface ParamEntityProxy

setInternal

public final void setInternal(java.lang.String internalValue)
Specified by:
setInternal in interface ParamEntityProxy

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

clone

public final java.lang.Object clone()
Overrides:
clone in class java.lang.Object

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()
Overrides:
toString in class org.ozoneDB.OzoneObject

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 Object.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

init

public void init(DocumentProxy owner,
                 java.lang.String name)

init

public void init(DocumentProxy owner,
                 java.lang.String name,
                 java.lang.String value)
Specified by:
init in interface ParamEntityProxy

init

public void init(DocumentProxy owner,
                 java.lang.String name,
                 java.lang.String systemId,
                 java.lang.String publicId)
Specified by:
init in interface ParamEntityProxy


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