org.apache.crimson.tree
Interface ElementEx

All Superinterfaces:
org.w3c.dom.Element, org.w3c.dom.Node, NodeEx, XmlWritable
All Known Implementing Classes:
ElementNode2

public interface ElementEx
extends org.w3c.dom.Element, NodeEx

This extends the DOM Element interface with additional features. An ID attribute may be visible, and applications may request that memory usage be reduced.

There is also support for a single strongly associated object, permitting trees of XML objects to be coupled to other frameworks without requiring either subclassing or external tables to manage such associations. Such techniques will be required in some cases, perhaps in conjunction with this userObject.

Author:
David Brownell

Field Summary
 
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
 
Method Summary
 String getIdAttributeName()
          Returns the name of the attribute declared to hold the element's ID, or null if no such declaration is known.
 Object getUserObject()
          Returns the object associated with this element.
 void setUserObject(Object obj)
          Assigns an object to be associated with this element.
 void trimToSize()
          Requests that the element minimize the amount of space it uses, to conserve memory.
 
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.apache.crimson.tree.NodeEx
getIndexOf, getInheritedAttribute, getLanguage, isReadonly, setReadonly
 
Methods inherited from interface org.apache.crimson.tree.XmlWritable
writeChildrenXml, writeXml
 

Method Detail

getIdAttributeName

public String getIdAttributeName()
Returns the name of the attribute declared to hold the element's ID, or null if no such declaration is known. This is normally declared in the Document Type Declaration (DTD). Parsers are not required to parse DTDs, and document trees constructed without a parser may not have access to the DTD, so such declarations may often not be known.

ID attributes are used within XML documents to support links using IDREF and IDREFS attributes. They are also used in current drafts of XPointer and XSL specifications.

Returns:
the name of the ID attribute

getUserObject

public Object getUserObject()
Returns the object associated with this element. In cases where more than one such object must be so associated, the association must be maintained externally.


setUserObject

public void setUserObject(Object obj)
Assigns an object to be associated with this element.


trimToSize

public void trimToSize()
Requests that the element minimize the amount of space it uses, to conserve memory. Children are not affected.