java.lang.Object
io.sf.carte.echosvg.dom.AbstractNode
- All Implemented Interfaces:
- NodeEventTarget,- ExtendedNode,- NodeXBL,- XBLManagerData,- Serializable,- EventTarget,- Node
- Direct Known Subclasses:
- AbstractChildNode,- AbstractNotation,- AbstractParentNode
public abstract class AbstractNode
extends Object
implements ExtendedNode, NodeXBL, XBLManagerData, Serializable
This class implements the 
Node interface.- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final NodeListAn empty instance of NodeList.protected EventSupportThe event support.protected ObjectThe XBL manager data.protected AbstractDocumentThe owner document.User data.User data handlers.Fields inherited from interface org.w3c.dom.NodeATTRIBUTE_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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEventListener(String type, EventListener listener, boolean useCapture) DOM: ImplementsEventTarget.addEventListener(String,EventListener,boolean).voidaddEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup) appendChild(Node newChild) DOM: ImplementsNode.appendChild(Node).protected voidcheckChildType(Node n, boolean replace) Checks the validity of a node to be inserted.cloneNode(boolean deep) DOM: ImplementsNode.cloneNode(boolean).shortcompareDocumentPosition(Node other) DOM: ImplementsNode.compareDocumentPosition(Node).protected booleancompareNamedNodeMaps(NamedNodeMap nnm1, NamedNodeMap nnm2) Compare two NamedNodeMaps for equality.protected booleancompareStrings(String s1, String s2) Compare two strings for equality.protected NodeCopy the fields of the current node into the given node.createDOMException(short type, String key, Object[] args) Creates an exception with the appropriate error message.protected NodedeepCopyInto(Node n) Deeply copy the fields of the current node into the given node.protected NodedeepExport(Node n, AbstractDocument d) Deeply exports this node to the given document.booleandispatchEvent(Event evt) DOM: ImplementsEventTarget.dispatchEvent(Event).protected Nodeexport(Node n, AbstractDocument d) Exports this node to the given document.protected voidfireDOMCharacterDataModifiedEvent(String oldv, String newv) Fires a DOMCharacterDataModified event.voidRecursively fires a DOMNodeInsertedIntoDocument event.voidRecursively fires a DOMNodeRemovedFromDocument event.protected voidfireUserDataHandlers(short type, Node oldNode, Node newNode) Fire any UserDataHandlers on the given oldNode.DOM: ImplementsNode.getAttributes().DOM: ImplementsNode.getBaseURI().static StringgetBaseURI(Node n) protected StringgetCascadedXMLBase(Node node) Returns the xml:base attribute value of the given element, resolving any dependency on parent bases if needed.DOM: ImplementsNode.getChildNodes().protected AbstractDocumentReturns the current document.Returns the event support instance for this node, or null if any.getFeature(String feature, String version) DOM: ImplementsNode.getFeature(String,String).DOM: ImplementsNode.getFirstChild().DOM: ImplementsNode.getLastChild().DOM: ImplementsNode.getLocalName().Returns the XBL manager associated data for this node.DOM: ImplementsNode.getNamespaceURI().DOM: ImplementsNode.getNextSibling().DOM: ImplementsNode.getNodeValue().DOM: ImplementsNode.getOwnerDocument().DOM: ImplementsNode.getParentNode().ImplementsNodeEventTarget.getParentNodeEventTarget().DOM: ImplementsNode.getPrefix().DOM: ImplementsNode.getPreviousSibling().DOM: ImplementsNode.getTextContent().getUserData(String key) DOM: ImplementsNode.getUserData(String).Get the bound element whose shadow tree this current node resides in.Get the list of child nodes of this node in the fully flattened tree.Get the xbl:definition elements currently binding this element.Get the first child node of this node in the fully flattened tree.Get the first element child of this node in the fully flattened tree.Get the last child node of this node in the fully flattened tree.Get the last element child of this node in the fully flattened tree.Get the first element that follows the current node in the xblParentNode's xblChildNodes list.Get the node which directly follows the current node in the xblParentNode's xblChildNodes list.Get the parent of this node in the fully flattened tree.Get the first element that precedes the current node in the xblParentNode's xblChildNodes list.Get the node which directly precedes the current node in the xblParentNode's xblChildNodes list.Get the list of child nodes of this node in the fully flattened tree that are within the same shadow scope.Get the shadow tree of this node.booleanDOM: ImplementsNode.hasAttributes().booleanDOM: ImplementsNode.hasChildNodes().booleanhasEventListenerNS(String namespaceURI, String type) DOM: ImplementsEventTarget.hasEventListenerNS(String,String)from an old draft of DOM Level 3 Events.Initializes the event support instance for this node if it has not been already, and returns it.insertBefore(Node newChild, Node refChild) DOM: ImplementsNode.insertBefore(Node, Node).booleanisDefaultNamespace(String namespaceURI) DOM: ImplementsNode.isDefaultNamespace(String).booleanisEqualNode(Node other) DOM: ImplementsNode.isEqualNode(Node).booleanisSameNode(Node other) DOM: ImplementsNode.isSameNode(Node).booleanisSupported(String feature, String version) DOM: ImplementsNode.isSupported(String,String).protected StringlookupNamespacePrefix(String namespaceURI, Element originalElement) Helper function forlookupPrefix(java.lang.String).lookupNamespaceURI(String prefix) DOM: ImplementsNode.lookupNamespaceURI(String).lookupPrefix(String namespaceURI) DOM: ImplementsNode.lookupPrefix(String).protected abstract NodenewNode()Returns a new uninitialized instance of this object's class.voidDOM: ImplementsNode.normalize().removeChild(Node oldChild) DOM: ImplementsNode.removeChild(Node).voidremoveEventListener(String type, EventListener listener, boolean useCapture) DOM: ImplementsEventTarget.removeEventListener(String,EventListener,boolean).voidremoveEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture) replaceChild(Node newChild, Node oldChild) DOM: ImplementsNode.replaceChild(Node, Node).voidsetManagerData(Object data) Sets the XBL manager associated data for this node.voidSets the node immediately following this node.voidSets the name of this node.voidsetNodeValue(String nodeValue) DOM: ImplementsNode.setNodeValue(String).voidsetOwnerDocument(Document doc) Sets the owner document of this node.voidSets the parent node.voidDOM: ImplementsNode.setPrefix(String).voidSets the node immediately preceding this node.voidsetSpecified(boolean v) Sets the value of the specified attribute.voidDOM: ImplementsNode.setTextContent(String).setUserData(String key, Object data, UserDataHandler handler) DOM: ImplementsNode.setUserData(String,Object,UserDataHandler).booleanwillTriggerNS(String namespaceURI, String type) DOM: ImplementsEventTarget#willTriggerNS(String,String)from an old draft of DOM Level 3 Events.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sf.carte.echosvg.dom.ExtendedNodeisReadonly, setReadonlyMethods inherited from interface org.w3c.dom.NodegetNodeName, getNodeType
- 
Field Details- 
EMPTY_NODE_LISTAn empty instance of NodeList.
- 
ownerDocumentThe owner document.
- 
eventSupportThe event support.
- 
userDataUser data.
- 
userDataHandlersUser data handlers.
- 
managerDataThe XBL manager data.
- 
DOCUMENT_POSITION_DISCONNECTEDpublic static final short DOCUMENT_POSITION_DISCONNECTED- See Also:
 
- 
DOCUMENT_POSITION_PRECEDINGpublic static final short DOCUMENT_POSITION_PRECEDING- See Also:
 
- 
DOCUMENT_POSITION_FOLLOWINGpublic static final short DOCUMENT_POSITION_FOLLOWING- See Also:
 
- 
DOCUMENT_POSITION_CONTAINSpublic static final short DOCUMENT_POSITION_CONTAINS- See Also:
 
- 
DOCUMENT_POSITION_CONTAINED_BYpublic static final short DOCUMENT_POSITION_CONTAINED_BY- See Also:
 
- 
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFICpublic static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC- See Also:
 
 
- 
- 
Constructor Details- 
AbstractNodepublic AbstractNode()
 
- 
- 
Method Details- 
setNodeNameSets the name of this node. Do nothing.- Specified by:
- setNodeNamein interface- ExtendedNode
 
- 
setOwnerDocumentSets the owner document of this node.- Specified by:
- setOwnerDocumentin interface- ExtendedNode
 
- 
setSpecifiedpublic void setSpecified(boolean v) Sets the value of the specified attribute. This method only applies to Attr objects.- Specified by:
- setSpecifiedin interface- ExtendedNode
 
- 
getNodeValueDOM: ImplementsNode.getNodeValue().- Specified by:
- getNodeValuein interface- Node
- Returns:
- null.
- Throws:
- DOMException
 
- 
setNodeValueDOM: ImplementsNode.setNodeValue(String). Do nothing.- Specified by:
- setNodeValuein interface- Node
- Throws:
- DOMException
 
- 
getParentNodeDOM: ImplementsNode.getParentNode().- Specified by:
- getParentNodein interface- Node
- Returns:
- null.
 
- 
setParentNodeSets the parent node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- setParentNodein interface- ExtendedNode
 
- 
getChildNodesDOM: ImplementsNode.getChildNodes().- Specified by:
- getChildNodesin interface- Node
- Returns:
- EMPTY_NODE_LIST.
 
- 
getFirstChildDOM: ImplementsNode.getFirstChild().- Specified by:
- getFirstChildin interface- Node
- Returns:
- null.
 
- 
getLastChildDOM: ImplementsNode.getLastChild().- Specified by:
- getLastChildin interface- Node
- Returns:
- null.
 
- 
setPreviousSiblingSets the node immediately preceding this node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- setPreviousSiblingin interface- ExtendedNode
 
- 
getPreviousSiblingDOM: ImplementsNode.getPreviousSibling().- Specified by:
- getPreviousSiblingin interface- Node
- Returns:
- null.
 
- 
setNextSiblingSets the node immediately following this node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- setNextSiblingin interface- ExtendedNode
 
- 
getNextSiblingDOM: ImplementsNode.getNextSibling().- Specified by:
- getNextSiblingin interface- Node
- Returns:
- null.
 
- 
hasAttributespublic boolean hasAttributes()DOM: ImplementsNode.hasAttributes().- Specified by:
- hasAttributesin interface- Node
- Returns:
- false.
 
- 
getAttributesDOM: ImplementsNode.getAttributes().- Specified by:
- getAttributesin interface- Node
- Returns:
- null.
 
- 
getOwnerDocumentDOM: ImplementsNode.getOwnerDocument().- Specified by:
- getOwnerDocumentin interface- Node
- Returns:
- ownerDocument.
 
- 
getNamespaceURIDOM: ImplementsNode.getNamespaceURI().- Specified by:
- getNamespaceURIin interface- Node
- Returns:
- null.
 
- 
insertBeforeDOM: ImplementsNode.insertBefore(Node, Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- insertBeforein interface- Node
- Throws:
- DOMException
 
- 
replaceChildDOM: ImplementsNode.replaceChild(Node, Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- replaceChildin interface- Node
- Throws:
- DOMException
 
- 
removeChildDOM: ImplementsNode.removeChild(Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- removeChildin interface- Node
- Throws:
- DOMException
 
- 
appendChildDOM: ImplementsNode.appendChild(Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
- appendChildin interface- Node
- Throws:
- DOMException
 
- 
hasChildNodespublic boolean hasChildNodes()DOM: ImplementsNode.hasChildNodes().- Specified by:
- hasChildNodesin interface- Node
- Returns:
- false.
 
- 
cloneNodeDOM: ImplementsNode.cloneNode(boolean).
- 
normalizepublic void normalize()DOM: ImplementsNode.normalize(). Do nothing.
- 
isSupportedDOM: ImplementsNode.isSupported(String,String).- Specified by:
- isSupportedin interface- Node
 
- 
getPrefixDOM: ImplementsNode.getPrefix().
- 
setPrefixDOM: ImplementsNode.setPrefix(String).- Specified by:
- setPrefixin interface- Node
- Throws:
- DOMException
 
- 
getLocalNameDOM: ImplementsNode.getLocalName().- Specified by:
- getLocalNamein interface- Node
 
- 
createDOMExceptionCreates an exception with the appropriate error message.
- 
getCascadedXMLBaseReturns the xml:base attribute value of the given element, resolving any dependency on parent bases if needed.
- 
getBaseURIDOM: ImplementsNode.getBaseURI().- Specified by:
- getBaseURIin interface- Node
 
- 
getBaseURI
- 
compareDocumentPositionDOM: ImplementsNode.compareDocumentPosition(Node). XXX Doesn't handle notation or entity nodes.- Specified by:
- compareDocumentPositionin interface- Node
- Throws:
- DOMException
 
- 
getTextContentDOM: ImplementsNode.getTextContent().- Specified by:
- getTextContentin interface- Node
 
- 
setTextContentDOM: ImplementsNode.setTextContent(String).- Specified by:
- setTextContentin interface- Node
- Throws:
- DOMException
 
- 
isSameNodeDOM: ImplementsNode.isSameNode(Node).- Specified by:
- isSameNodein interface- Node
 
- 
lookupPrefixDOM: ImplementsNode.lookupPrefix(String).- Specified by:
- lookupPrefixin interface- Node
 
- 
lookupNamespacePrefixHelper function forlookupPrefix(java.lang.String).
- 
isDefaultNamespaceDOM: ImplementsNode.isDefaultNamespace(String).- Specified by:
- isDefaultNamespacein interface- Node
 
- 
lookupNamespaceURIDOM: ImplementsNode.lookupNamespaceURI(String).- Specified by:
- lookupNamespaceURIin interface- Node
 
- 
isEqualNodeDOM: ImplementsNode.isEqualNode(Node).- Specified by:
- isEqualNodein interface- Node
 
- 
compareStringsCompare two strings for equality.
- 
compareNamedNodeMapsCompare two NamedNodeMaps for equality.
- 
getFeatureDOM: ImplementsNode.getFeature(String,String).- Specified by:
- getFeaturein interface- Node
 
- 
getUserDataDOM: ImplementsNode.getUserData(String).- Specified by:
- getUserDatain interface- Node
 
- 
setUserDataDOM: ImplementsNode.setUserData(String,Object,UserDataHandler).- Specified by:
- setUserDatain interface- Node
 
- 
fireUserDataHandlersFire any UserDataHandlers on the given oldNode.
- 
addEventListenerDOM: ImplementsEventTarget.addEventListener(String,EventListener,boolean).- Specified by:
- addEventListenerin interface- EventTarget
 
- 
addEventListenerNSpublic void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup) - Specified by:
- addEventListenerNSin interface- NodeEventTarget
- Parameters:
- namespaceURI- Specifies the- Event.namespaceURIassociated with the event for which the user is registering.
- type- Refer to the- EventTarget.addEventListener()method for a description of this parameter.
- listener- Refer to the- EventTarget.addEventListener()method for a description of this parameter.
- useCapture- Refer to the- EventTarget.addEventListener()method for a description of this parameter.
- evtGroup- The object that represents the event group to associate with the- EventListener(see also ). Use- nullto attach the event listener to the default group.
 
- 
removeEventListenerDOM: ImplementsEventTarget.removeEventListener(String,EventListener,boolean).- Specified by:
- removeEventListenerin interface- EventTarget
 
- 
removeEventListenerNSpublic void removeEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture) - Specified by:
- removeEventListenerNSin interface- NodeEventTarget
- Parameters:
- namespaceURI- Specifies the- Event.namespaceURIassociated with the event for which the user registered the event listener.
- type- Refer to the- EventTarget.removeEventListener()method for a description of this parameter.
- listener- Refer to the- EventTarget.removeEventListener()method for a description of this parameter.
- useCapture- Refer to the- EventTarget.removeEventListener()method for a description of this parameter.
 
- 
getParentNodeEventTargetImplementsNodeEventTarget.getParentNodeEventTarget().- Specified by:
- getParentNodeEventTargetin interface- NodeEventTarget
 
- 
dispatchEventDOM: ImplementsEventTarget.dispatchEvent(Event).- Specified by:
- dispatchEventin interface- EventTarget
- Specified by:
- dispatchEventin interface- NodeEventTarget
- Parameters:
- evt- The event to be dispatched.
- Returns:
- Indicates whether any of the listeners which handled the event called
         Event.preventDefault(). IfEvent.preventDefault()was called the returned value isfalse, else it istrue.
- Throws:
- EventException- UNSPECIFIED_EVENT_TYPE_ERR: Raised if the- Event.typewas not specified by initializing the event before- dispatchEventwas called. Specification of the- Event.typeas- nullor an empty string will also trigger this exception.
 DISPATCH_REQUEST_ERR: Raised if the- Eventobject is already being dispatched.
 
- 
willTriggerNSDOM: ImplementsEventTarget#willTriggerNS(String,String)from an old draft of DOM Level 3 Events.
- 
hasEventListenerNSDOM: ImplementsEventTarget.hasEventListenerNS(String,String)from an old draft of DOM Level 3 Events.
- 
getEventSupportReturns the event support instance for this node, or null if any.- Specified by:
- getEventSupportin interface- NodeEventTarget
 
- 
initializeEventSupportInitializes the event support instance for this node if it has not been already, and returns it.
- 
fireDOMNodeInsertedIntoDocumentEventpublic void fireDOMNodeInsertedIntoDocumentEvent()Recursively fires a DOMNodeInsertedIntoDocument event.
- 
fireDOMNodeRemovedFromDocumentEventpublic void fireDOMNodeRemovedFromDocumentEvent()Recursively fires a DOMNodeRemovedFromDocument event.
- 
fireDOMCharacterDataModifiedEventFires a DOMCharacterDataModified event.
- 
getCurrentDocumentReturns the current document.
- 
newNodeReturns a new uninitialized instance of this object's class.
- 
exportExports this node to the given document.
- 
deepExportDeeply exports this node to the given document.
- 
copyIntoCopy the fields of the current node into the given node.- Parameters:
- n- a node of the type of this.
 
- 
deepCopyIntoDeeply copy the fields of the current node into the given node.- Parameters:
- n- a node of the type of this.
 
- 
checkChildTypeChecks the validity of a node to be inserted.
- 
getXblParentNodeGet the parent of this node in the fully flattened tree.- Specified by:
- getXblParentNodein interface- NodeXBL
 
- 
getXblChildNodesGet the list of child nodes of this node in the fully flattened tree.- Specified by:
- getXblChildNodesin interface- NodeXBL
 
- 
getXblScopedChildNodesGet the list of child nodes of this node in the fully flattened tree that are within the same shadow scope.- Specified by:
- getXblScopedChildNodesin interface- NodeXBL
 
- 
getXblFirstChildGet the first child node of this node in the fully flattened tree.- Specified by:
- getXblFirstChildin interface- NodeXBL
 
- 
getXblLastChildGet the last child node of this node in the fully flattened tree.- Specified by:
- getXblLastChildin interface- NodeXBL
 
- 
getXblPreviousSiblingGet the node which directly precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
- getXblPreviousSiblingin interface- NodeXBL
 
- 
getXblNextSiblingGet the node which directly follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
- getXblNextSiblingin interface- NodeXBL
 
- 
getXblFirstElementChildGet the first element child of this node in the fully flattened tree.- Specified by:
- getXblFirstElementChildin interface- NodeXBL
 
- 
getXblLastElementChildGet the last element child of this node in the fully flattened tree.- Specified by:
- getXblLastElementChildin interface- NodeXBL
 
- 
getXblPreviousElementSiblingGet the first element that precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
- getXblPreviousElementSiblingin interface- NodeXBL
 
- 
getXblNextElementSiblingGet the first element that follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
- getXblNextElementSiblingin interface- NodeXBL
 
- 
getXblBoundElementGet the bound element whose shadow tree this current node resides in.- Specified by:
- getXblBoundElementin interface- NodeXBL
 
- 
getXblShadowTreeGet the shadow tree of this node.- Specified by:
- getXblShadowTreein interface- NodeXBL
 
- 
getXblDefinitionsGet the xbl:definition elements currently binding this element.- Specified by:
- getXblDefinitionsin interface- NodeXBL
 
- 
getManagerDataReturns the XBL manager associated data for this node.- Specified by:
- getManagerDatain interface- XBLManagerData
 
- 
setManagerDataSets the XBL manager associated data for this node.- Specified by:
- setManagerDatain interface- XBLManagerData
 
 
-