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 Summary
FieldsModifier 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.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
Constructors -
Method Summary
Modifier 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sf.carte.echosvg.dom.ExtendedNode
isReadonly, setReadonlyMethods inherited from interface org.w3c.dom.Node
getNodeName, getNodeType
-
Field Details
-
EMPTY_NODE_LIST
An empty instance of NodeList. -
ownerDocument
The owner document. -
eventSupport
The event support. -
userData
User data. -
userDataHandlers
User data handlers. -
managerData
The XBL manager data. -
DOCUMENT_POSITION_DISCONNECTED
public static final short DOCUMENT_POSITION_DISCONNECTED- See Also:
-
DOCUMENT_POSITION_PRECEDING
public static final short DOCUMENT_POSITION_PRECEDING- See Also:
-
DOCUMENT_POSITION_FOLLOWING
public static final short DOCUMENT_POSITION_FOLLOWING- See Also:
-
DOCUMENT_POSITION_CONTAINS
public static final short DOCUMENT_POSITION_CONTAINS- See Also:
-
DOCUMENT_POSITION_CONTAINED_BY
public static final short DOCUMENT_POSITION_CONTAINED_BY- See Also:
-
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC- See Also:
-
-
Constructor Details
-
AbstractNode
public AbstractNode()
-
-
Method Details
-
setNodeName
Sets the name of this node. Do nothing.- Specified by:
setNodeNamein interfaceExtendedNode
-
setOwnerDocument
Sets the owner document of this node.- Specified by:
setOwnerDocumentin interfaceExtendedNode
-
setSpecified
public void setSpecified(boolean v) Sets the value of the specified attribute. This method only applies to Attr objects.- Specified by:
setSpecifiedin interfaceExtendedNode
-
getNodeValue
DOM: ImplementsNode.getNodeValue().- Specified by:
getNodeValuein interfaceNode- Returns:
- null.
- Throws:
DOMException
-
setNodeValue
DOM: ImplementsNode.setNodeValue(String). Do nothing.- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
getParentNode
DOM: ImplementsNode.getParentNode().- Specified by:
getParentNodein interfaceNode- Returns:
- null.
-
setParentNode
Sets the parent node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
setParentNodein interfaceExtendedNode
-
getChildNodes
DOM: ImplementsNode.getChildNodes().- Specified by:
getChildNodesin interfaceNode- Returns:
EMPTY_NODE_LIST.
-
getFirstChild
DOM: ImplementsNode.getFirstChild().- Specified by:
getFirstChildin interfaceNode- Returns:
- null.
-
getLastChild
DOM: ImplementsNode.getLastChild().- Specified by:
getLastChildin interfaceNode- Returns:
- null.
-
setPreviousSibling
Sets the node immediately preceding this node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
setPreviousSiblingin interfaceExtendedNode
-
getPreviousSibling
DOM: ImplementsNode.getPreviousSibling().- Specified by:
getPreviousSiblingin interfaceNode- Returns:
- null.
-
setNextSibling
Sets the node immediately following this node. Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
setNextSiblingin interfaceExtendedNode
-
getNextSibling
DOM: ImplementsNode.getNextSibling().- Specified by:
getNextSiblingin interfaceNode- Returns:
- null.
-
hasAttributes
public boolean hasAttributes()DOM: ImplementsNode.hasAttributes().- Specified by:
hasAttributesin interfaceNode- Returns:
- false.
-
getAttributes
DOM: ImplementsNode.getAttributes().- Specified by:
getAttributesin interfaceNode- Returns:
- null.
-
getOwnerDocument
DOM: ImplementsNode.getOwnerDocument().- Specified by:
getOwnerDocumentin interfaceNode- Returns:
ownerDocument.
-
getNamespaceURI
DOM: ImplementsNode.getNamespaceURI().- Specified by:
getNamespaceURIin interfaceNode- Returns:
- null.
-
insertBefore
DOM: ImplementsNode.insertBefore(Node, Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
replaceChild
DOM: ImplementsNode.replaceChild(Node, Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
removeChild
DOM: ImplementsNode.removeChild(Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
appendChild
DOM: ImplementsNode.appendChild(Node). Throws a HIERARCHY_REQUEST_ERRDOMException.- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()DOM: ImplementsNode.hasChildNodes().- Specified by:
hasChildNodesin interfaceNode- Returns:
- false.
-
cloneNode
DOM: ImplementsNode.cloneNode(boolean). -
normalize
public void normalize()DOM: ImplementsNode.normalize(). Do nothing. -
isSupported
DOM: ImplementsNode.isSupported(String,String).- Specified by:
isSupportedin interfaceNode
-
getPrefix
DOM: ImplementsNode.getPrefix(). -
setPrefix
DOM: ImplementsNode.setPrefix(String).- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
getLocalName
DOM: ImplementsNode.getLocalName().- Specified by:
getLocalNamein interfaceNode
-
createDOMException
Creates an exception with the appropriate error message. -
getCascadedXMLBase
Returns the xml:base attribute value of the given element, resolving any dependency on parent bases if needed. -
getBaseURI
DOM: ImplementsNode.getBaseURI().- Specified by:
getBaseURIin interfaceNode
-
getBaseURI
-
compareDocumentPosition
DOM: ImplementsNode.compareDocumentPosition(Node). XXX Doesn't handle notation or entity nodes.- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getTextContent
DOM: ImplementsNode.getTextContent().- Specified by:
getTextContentin interfaceNode
-
setTextContent
DOM: ImplementsNode.setTextContent(String).- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
isSameNode
DOM: ImplementsNode.isSameNode(Node).- Specified by:
isSameNodein interfaceNode
-
lookupPrefix
DOM: ImplementsNode.lookupPrefix(String).- Specified by:
lookupPrefixin interfaceNode
-
lookupNamespacePrefix
Helper function forlookupPrefix(java.lang.String). -
isDefaultNamespace
DOM: ImplementsNode.isDefaultNamespace(String).- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
DOM: ImplementsNode.lookupNamespaceURI(String).- Specified by:
lookupNamespaceURIin interfaceNode
-
isEqualNode
DOM: ImplementsNode.isEqualNode(Node).- Specified by:
isEqualNodein interfaceNode
-
compareStrings
Compare two strings for equality. -
compareNamedNodeMaps
Compare two NamedNodeMaps for equality. -
getFeature
DOM: ImplementsNode.getFeature(String,String).- Specified by:
getFeaturein interfaceNode
-
getUserData
DOM: ImplementsNode.getUserData(String).- Specified by:
getUserDatain interfaceNode
-
setUserData
DOM: ImplementsNode.setUserData(String,Object,UserDataHandler).- Specified by:
setUserDatain interfaceNode
-
fireUserDataHandlers
Fire any UserDataHandlers on the given oldNode. -
addEventListener
DOM: ImplementsEventTarget.addEventListener(String,EventListener,boolean).- Specified by:
addEventListenerin interfaceEventTarget
-
addEventListenerNS
public void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup) - Specified by:
addEventListenerNSin interfaceNodeEventTarget- Parameters:
namespaceURI- Specifies theEvent.namespaceURIassociated with the event for which the user is registering.type- Refer to theEventTarget.addEventListener()method for a description of this parameter.listener- Refer to theEventTarget.addEventListener()method for a description of this parameter.useCapture- Refer to theEventTarget.addEventListener()method for a description of this parameter.evtGroup- The object that represents the event group to associate with theEventListener(see also ). Usenullto attach the event listener to the default group.
-
removeEventListener
DOM: ImplementsEventTarget.removeEventListener(String,EventListener,boolean).- Specified by:
removeEventListenerin interfaceEventTarget
-
removeEventListenerNS
public void removeEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture) - Specified by:
removeEventListenerNSin interfaceNodeEventTarget- Parameters:
namespaceURI- Specifies theEvent.namespaceURIassociated with the event for which the user registered the event listener.type- Refer to theEventTarget.removeEventListener()method for a description of this parameter.listener- Refer to theEventTarget.removeEventListener()method for a description of this parameter.useCapture- Refer to theEventTarget.removeEventListener()method for a description of this parameter.
-
getParentNodeEventTarget
ImplementsNodeEventTarget.getParentNodeEventTarget().- Specified by:
getParentNodeEventTargetin interfaceNodeEventTarget
-
dispatchEvent
DOM: ImplementsEventTarget.dispatchEvent(Event).- Specified by:
dispatchEventin interfaceEventTarget- Specified by:
dispatchEventin interfaceNodeEventTarget- 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 theEvent.typewas not specified by initializing the event beforedispatchEventwas called. Specification of theEvent.typeasnullor an empty string will also trigger this exception.
DISPATCH_REQUEST_ERR: Raised if theEventobject is already being dispatched.
-
willTriggerNS
DOM: ImplementsEventTarget#willTriggerNS(String,String)from an old draft of DOM Level 3 Events. -
hasEventListenerNS
DOM: ImplementsEventTarget.hasEventListenerNS(String,String)from an old draft of DOM Level 3 Events. -
getEventSupport
Returns the event support instance for this node, or null if any.- Specified by:
getEventSupportin interfaceNodeEventTarget
-
initializeEventSupport
Initializes the event support instance for this node if it has not been already, and returns it. -
fireDOMNodeInsertedIntoDocumentEvent
public void fireDOMNodeInsertedIntoDocumentEvent()Recursively fires a DOMNodeInsertedIntoDocument event. -
fireDOMNodeRemovedFromDocumentEvent
public void fireDOMNodeRemovedFromDocumentEvent()Recursively fires a DOMNodeRemovedFromDocument event. -
fireDOMCharacterDataModifiedEvent
Fires a DOMCharacterDataModified event. -
getCurrentDocument
Returns the current document. -
newNode
Returns a new uninitialized instance of this object's class. -
export
Exports this node to the given document. -
deepExport
Deeply exports this node to the given document. -
copyInto
Copy the fields of the current node into the given node.- Parameters:
n- a node of the type of this.
-
deepCopyInto
Deeply copy the fields of the current node into the given node.- Parameters:
n- a node of the type of this.
-
checkChildType
Checks the validity of a node to be inserted. -
getXblParentNode
Get the parent of this node in the fully flattened tree.- Specified by:
getXblParentNodein interfaceNodeXBL
-
getXblChildNodes
Get the list of child nodes of this node in the fully flattened tree.- Specified by:
getXblChildNodesin interfaceNodeXBL
-
getXblScopedChildNodes
Get the list of child nodes of this node in the fully flattened tree that are within the same shadow scope.- Specified by:
getXblScopedChildNodesin interfaceNodeXBL
-
getXblFirstChild
Get the first child node of this node in the fully flattened tree.- Specified by:
getXblFirstChildin interfaceNodeXBL
-
getXblLastChild
Get the last child node of this node in the fully flattened tree.- Specified by:
getXblLastChildin interfaceNodeXBL
-
getXblPreviousSibling
Get the node which directly precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblPreviousSiblingin interfaceNodeXBL
-
getXblNextSibling
Get the node which directly follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblNextSiblingin interfaceNodeXBL
-
getXblFirstElementChild
Get the first element child of this node in the fully flattened tree.- Specified by:
getXblFirstElementChildin interfaceNodeXBL
-
getXblLastElementChild
Get the last element child of this node in the fully flattened tree.- Specified by:
getXblLastElementChildin interfaceNodeXBL
-
getXblPreviousElementSibling
Get the first element that precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblPreviousElementSiblingin interfaceNodeXBL
-
getXblNextElementSibling
Get the first element that follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblNextElementSiblingin interfaceNodeXBL
-
getXblBoundElement
Get the bound element whose shadow tree this current node resides in.- Specified by:
getXblBoundElementin interfaceNodeXBL
-
getXblShadowTree
Get the shadow tree of this node.- Specified by:
getXblShadowTreein interfaceNodeXBL
-
getXblDefinitions
Get the xbl:definition elements currently binding this element.- Specified by:
getXblDefinitionsin interfaceNodeXBL
-
getManagerData
Returns the XBL manager associated data for this node.- Specified by:
getManagerDatain interfaceXBLManagerData
-
setManagerData
Sets the XBL manager associated data for this node.- Specified by:
setManagerDatain interfaceXBLManagerData
-