org.ozoneDB.xml
Class XMLElement

java.lang.Object
  |
  +--org.ozoneDB.OzoneObject
        |
        +--org.ozoneDB.xml.dom.NodeImpl
              |
              +--org.ozoneDB.xml.dom.ElementImpl
                    |
                    +--org.ozoneDB.xml.XMLElement
All Implemented Interfaces:
org.w3c.dom.Element, ElementProxy, java.io.Externalizable, org.w3c.dom.NamedNodeMap, NamedNodeMapProxy, org.w3c.dom.Node, NodeProxy, org.ozoneDB.OzoneCompatible, org.ozoneDB.OzoneCompatibleOrProxy, org.ozoneDB.OzoneRemote, java.io.Serializable, XMLElementProxy

Deprecated. Alternative API will be introduced in OpenXML 1.1

public class XMLElement
extends ElementImpl
implements XMLElementProxy

Base class for user XML elements. XMLDocument is designed to create elements of classes derived from XMLElement. In addition to several API extensions, user XML elements can be used to map XML documents directly into application data structures.

XMLElement extends the DOM Element with the following methods:

In order to support user elements, a document class must extend XMLDocument. It then registers tag name to element class associations using DocumentImpl.registerElement(java.lang.String, java.lang.Class), or uses an external element factory with XMLDocument#useElementFactory.

The user elements will be returns whenever DocumentImpl.createElement(java.lang.String) is called on the document, or when a document of this type is parsed.

A user element derived from XMLElement must pass the owner document and tag name to its constructor. The class and its constructor must be declared public and the constructor must have the same signature as the XMLElement constructor. The last three requirements may be relaxed if an external element factory is used.

Version:
$Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
Author:
Assaf Arkin
See Also:
Element, DocumentImpl.registerElement(java.lang.String, java.lang.Class), XMLElementFactory, Serialized Form

Field Summary
protected  java.lang.Object _userObject
          Deprecated. Holds a user object.
 
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
XMLElement()
          Deprecated.  
XMLElement(org.w3c.dom.Document owner, java.lang.String tagName)
          Deprecated. Constructor requires owner document and element tag name.
 
Method Summary
 java.lang.String getID()
          Deprecated. Returns the identifier of this element.
 java.lang.Object getUserObject()
          Deprecated. Returns the user object associated with this element.
 void setUserObject(java.lang.Object userObject)
          Deprecated. Associates this element with a user object.
 
Methods inherited from class org.ozoneDB.xml.dom.ElementImpl
appendAttr, clone, cloneInto, cloneNode, elements, equals, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getElementsByTagName, getElementsByTagNameNS, getLength, getNamedAttr, getNamedItem, getNamedItemNS, getNodeType, getTagName, hasAttribute, hasAttributeNS, hasAttributes, init, item, normalize, onDelete, readExternal, removeAttr, removeAttribute, removeAttributeNode, removeAttributeNS, removeNamedItem, removeNamedItemNS, setAttrCount, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setFirstAttr, setLastAttr, setNamedItem, setNamedItemNS, setNodeValue, supportsChildern, toString, writeExternal
 
Methods inherited from class org.ozoneDB.xml.dom.NodeImpl
appendChild, castNewChild, castOldChild, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, init, insertBefore, isReadOnly, isSupported, notifyIterators, removeChild, replaceChild, setNextSibling, setNodeName, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setReadOnly, supports
 
Methods inherited from class org.ozoneDB.OzoneObject
container, database, deleteRecursive, getObjectID, handle, hashCode, onCreate, 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.ElementProxy
appendAttr, getLength, getNamedAttr, setAttrCount, setFirstAttr, setLastAttr
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.ozoneDB.xml.dom.NodeProxy
cloneInto, getChild, getChildCount, getChildNodes, init, isReadOnly, setNextSibling, setNodeName, setOwnerDocument, setParentNode, setPreviousSibling, setReadOnly
 
Methods inherited from interface org.ozoneDB.xml.dom.NamedNodeMapProxy
elements, getNamedItem, init
 
Methods inherited from interface org.w3c.dom.NamedNodeMap
getNamedItemNS, item, removeNamedItem, removeNamedItemNS, setNamedItem, setNamedItemNS
 

Field Detail

_userObject

protected java.lang.Object _userObject
Deprecated. 
Holds a user object. Any object can be associated with this element using the appropriate set/get methods.

Constructor Detail

XMLElement

public XMLElement(org.w3c.dom.Document owner,
                  java.lang.String tagName)
Deprecated. 
Constructor requires owner document and element tag name. This will be provided when an element of this or a derived class is being constructed by an XMLDocument. The arguments must pass to this constructor unaffected. Derived classes must implement at least one constructor with the exact same signature to support element class registration; this requirement is relaxed if an external element factory is used.

Parameters:
owner - The owner document
tagName - The element's tag name

XMLElement

public XMLElement()
Deprecated. 
Method Detail

setUserObject

public void setUserObject(java.lang.Object userObject)
Deprecated. 
Associates this element with a user object. There is no limit on what the user object may hold.

Parameters:
userObject - The user object

getUserObject

public java.lang.Object getUserObject()
Deprecated. 
Returns the user object associated with this element. There is no limit on what the user object may hold.

Returns:
The user object

getID

public java.lang.String getID()
Deprecated. 
Returns the identifier of this element. Unless specifies otherwise in the DTD, this would be the value of the id attribute. It may be a textual value or null.

Returns:
The identifier of this element


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