public abstract class AbstractNode extends java.lang.Object implements ExtendedNode, NodeXBL, XBLManagerData, java.io.Serializable
Node interface.| Modifier and Type | Field and Description |
|---|---|
static short |
DOCUMENT_POSITION_CONTAINED_BY |
static short |
DOCUMENT_POSITION_CONTAINS |
static short |
DOCUMENT_POSITION_DISCONNECTED |
static short |
DOCUMENT_POSITION_FOLLOWING |
static short |
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC |
static short |
DOCUMENT_POSITION_PRECEDING |
static NodeList |
EMPTY_NODE_LIST
An empty instance of NodeList.
|
protected EventSupport |
eventSupport
The event support.
|
protected java.lang.Object |
managerData
The XBL manager data.
|
protected AbstractDocument |
ownerDocument
The owner document.
|
protected java.util.HashMap |
userData
User data.
|
protected java.util.HashMap |
userDataHandlers
User data handlers.
|
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 and Description |
|---|
AbstractNode() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(java.lang.String type,
EventListener listener,
boolean useCapture)
DOM: Implements
EventTarget.addEventListener(String,EventListener,boolean). |
void |
addEventListenerNS(java.lang.String namespaceURI,
java.lang.String type,
EventListener listener,
boolean useCapture,
java.lang.Object evtGroup)
|
Node |
appendChild(Node newChild)
DOM: Implements
Node.appendChild(Node). |
protected void |
checkChildType(Node n,
boolean replace)
Checks the validity of a node to be inserted.
|
Node |
cloneNode(boolean deep)
DOM: Implements
Node.cloneNode(boolean). |
short |
compareDocumentPosition(Node other)
DOM: Implements
Node.compareDocumentPosition(Node). |
protected boolean |
compareNamedNodeMaps(NamedNodeMap nnm1,
NamedNodeMap nnm2)
Compare two NamedNodeMaps for equality.
|
protected boolean |
compareStrings(java.lang.String s1,
java.lang.String s2)
Compare two strings for equality.
|
protected Node |
copyInto(Node n)
Copy the fields of the current node into the given node.
|
DOMException |
createDOMException(short type,
java.lang.String key,
java.lang.Object[] args)
Creates an exception with the appropriate error message.
|
protected Node |
deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node.
|
protected Node |
deepExport(Node n,
AbstractDocument d)
Deeply exports this node to the given document.
|
boolean |
dispatchEvent(Event evt)
DOM: Implements
EventTarget.dispatchEvent(Event). |
protected Node |
export(Node n,
AbstractDocument d)
Exports this node to the given document.
|
protected void |
fireDOMCharacterDataModifiedEvent(java.lang.String oldv,
java.lang.String newv)
Fires a DOMCharacterDataModified event.
|
void |
fireDOMNodeInsertedIntoDocumentEvent()
Recursively fires a DOMNodeInsertedIntoDocument event.
|
void |
fireDOMNodeRemovedFromDocumentEvent()
Recursively fires a DOMNodeRemovedFromDocument event.
|
protected void |
fireUserDataHandlers(short type,
Node oldNode,
Node newNode)
Fire any UserDataHandlers on the given oldNode.
|
NamedNodeMap |
getAttributes()
DOM: Implements
Node.getAttributes(). |
java.lang.String |
getBaseURI()
DOM: Implements
Node.getBaseURI(). |
static java.lang.String |
getBaseURI(Node n) |
protected java.lang.String |
getCascadedXMLBase(Node node)
Returns the xml:base attribute value of the given element,
resolving any dependency on parent bases if needed.
|
NodeList |
getChildNodes()
DOM: Implements
Node.getChildNodes(). |
protected AbstractDocument |
getCurrentDocument()
Returns the current document.
|
EventSupport |
getEventSupport()
Returns the event support instance for this node, or null if any.
|
java.lang.Object |
getFeature(java.lang.String feature,
java.lang.String version)
DOM: Implements
Node.getFeature(String,String). |
Node |
getFirstChild()
DOM: Implements
Node.getFirstChild(). |
Node |
getLastChild()
DOM: Implements
Node.getLastChild(). |
java.lang.String |
getLocalName()
DOM: Implements
Node.getLocalName(). |
java.lang.Object |
getManagerData()
Returns the XBL manager associated data for this node.
|
java.lang.String |
getNamespaceURI()
DOM: Implements
Node.getNamespaceURI(). |
Node |
getNextSibling()
DOM: Implements
Node.getNextSibling(). |
java.lang.String |
getNodeValue()
DOM: Implements
Node.getNodeValue(). |
Document |
getOwnerDocument()
DOM: Implements
Node.getOwnerDocument(). |
Node |
getParentNode()
DOM: Implements
Node.getParentNode(). |
NodeEventTarget |
getParentNodeEventTarget()
Implements
NodeEventTarget.getParentNodeEventTarget(). |
java.lang.String |
getPrefix()
DOM: Implements
Node.getPrefix(). |
Node |
getPreviousSibling()
DOM: Implements
Node.getPreviousSibling(). |
java.lang.String |
getTextContent()
DOM: Implements
Node.getTextContent(). |
java.lang.Object |
getUserData(java.lang.String key)
DOM: Implements
Node.getUserData(String). |
Element |
getXblBoundElement()
Get the bound element whose shadow tree this current node resides in.
|
NodeList |
getXblChildNodes()
Get the list of child nodes of this node in the fully flattened tree.
|
NodeList |
getXblDefinitions()
Get the xbl:definition elements currently binding this element.
|
Node |
getXblFirstChild()
Get the first child node of this node in the fully flattened tree.
|
Element |
getXblFirstElementChild()
Get the first element child of this node in the fully flattened tree.
|
Node |
getXblLastChild()
Get the last child node of this node in the fully flattened tree.
|
Element |
getXblLastElementChild()
Get the last element child of this node in the fully flattened tree.
|
Element |
getXblNextElementSibling()
Get the first element that follows the current node in the
xblParentNode's xblChildNodes list.
|
Node |
getXblNextSibling()
Get the node which directly follows the current node in the
xblParentNode's xblChildNodes list.
|
Node |
getXblParentNode()
Get the parent of this node in the fully flattened tree.
|
Element |
getXblPreviousElementSibling()
Get the first element that precedes the current node in the
xblParentNode's xblChildNodes list.
|
Node |
getXblPreviousSibling()
Get the node which directly precedes the current node in the
xblParentNode's xblChildNodes list.
|
NodeList |
getXblScopedChildNodes()
Get the list of child nodes of this node in the fully flattened tree
that are within the same shadow scope.
|
Element |
getXblShadowTree()
Get the shadow tree of this node.
|
boolean |
hasAttributes()
DOM: Implements
Node.hasAttributes(). |
boolean |
hasChildNodes()
DOM: Implements
Node.hasChildNodes(). |
boolean |
hasEventListenerNS(java.lang.String namespaceURI,
java.lang.String type)
DOM: Implements
EventTarget.hasEventListenerNS(String,String) from an old
draft of DOM Level 3 Events. |
EventSupport |
initializeEventSupport()
Initializes the event support instance for this node if it has not
been already, and returns it.
|
Node |
insertBefore(Node newChild,
Node refChild)
DOM: Implements
Node.insertBefore(Node, Node). |
boolean |
isDefaultNamespace(java.lang.String namespaceURI)
DOM: Implements
Node.isDefaultNamespace(String). |
boolean |
isEqualNode(Node other)
DOM: Implements
Node.isEqualNode(Node). |
boolean |
isSameNode(Node other)
DOM: Implements
Node.isSameNode(Node). |
boolean |
isSupported(java.lang.String feature,
java.lang.String version)
DOM: Implements
Node.isSupported(String,String). |
protected java.lang.String |
lookupNamespacePrefix(java.lang.String namespaceURI,
Element originalElement)
Helper function for
lookupPrefix(java.lang.String). |
java.lang.String |
lookupNamespaceURI(java.lang.String prefix)
DOM: Implements
Node.lookupNamespaceURI(String). |
java.lang.String |
lookupPrefix(java.lang.String namespaceURI)
DOM: Implements
Node.lookupPrefix(String). |
protected abstract Node |
newNode()
Returns a new uninitialized instance of this object's class.
|
void |
normalize()
DOM: Implements
Node.normalize(). |
Node |
removeChild(Node oldChild)
DOM: Implements
Node.removeChild(Node). |
void |
removeEventListener(java.lang.String type,
EventListener listener,
boolean useCapture)
DOM: Implements
EventTarget.removeEventListener(String,EventListener,boolean). |
void |
removeEventListenerNS(java.lang.String namespaceURI,
java.lang.String type,
EventListener listener,
boolean useCapture)
|
Node |
replaceChild(Node newChild,
Node oldChild)
DOM: Implements
Node.replaceChild(Node, Node). |
void |
setManagerData(java.lang.Object data)
Sets the XBL manager associated data for this node.
|
void |
setNextSibling(Node n)
Sets the node immediately following this node.
|
void |
setNodeName(java.lang.String v)
Sets the name of this node.
|
void |
setNodeValue(java.lang.String nodeValue)
DOM: Implements
Node.setNodeValue(String). |
void |
setOwnerDocument(Document doc)
Sets the owner document of this node.
|
void |
setParentNode(Node v)
Sets the parent node.
|
void |
setPrefix(java.lang.String prefix)
DOM: Implements
Node.setPrefix(String). |
void |
setPreviousSibling(Node n)
Sets the node immediately preceding this node.
|
void |
setSpecified(boolean v)
Sets the value of the specified attribute.
|
void |
setTextContent(java.lang.String s)
DOM: Implements
Node.setTextContent(String). |
java.lang.Object |
setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
DOM: Implements
Node.setUserData(String,Object,UserDataHandler). |
boolean |
willTriggerNS(java.lang.String namespaceURI,
java.lang.String type)
DOM: Implements
EventTarget#willTriggerNS(String,String) from an old draft
of DOM Level 3 Events. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReadonly, setReadonlygetNodeName, getNodeTypepublic static final NodeList EMPTY_NODE_LIST
protected AbstractDocument ownerDocument
protected transient EventSupport eventSupport
protected java.util.HashMap userData
protected java.util.HashMap userDataHandlers
protected java.lang.Object managerData
public static final short DOCUMENT_POSITION_DISCONNECTED
public static final short DOCUMENT_POSITION_PRECEDING
public static final short DOCUMENT_POSITION_FOLLOWING
public static final short DOCUMENT_POSITION_CONTAINS
public static final short DOCUMENT_POSITION_CONTAINED_BY
public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
public void setNodeName(java.lang.String v)
setNodeName in interface ExtendedNodepublic void setOwnerDocument(Document doc)
setOwnerDocument in interface ExtendedNodepublic void setSpecified(boolean v)
setSpecified in interface ExtendedNodepublic java.lang.String getNodeValue()
throws DOMException
Node.getNodeValue().getNodeValue in interface NodeDOMExceptionpublic void setNodeValue(java.lang.String nodeValue)
throws DOMException
Node.setNodeValue(String).
Do nothing.setNodeValue in interface NodeDOMExceptionpublic Node getParentNode()
Node.getParentNode().getParentNode in interface Nodepublic void setParentNode(Node v)
DOMException.setParentNode in interface ExtendedNodepublic NodeList getChildNodes()
Node.getChildNodes().getChildNodes in interface NodeEMPTY_NODE_LIST.public Node getFirstChild()
Node.getFirstChild().getFirstChild in interface Nodepublic Node getLastChild()
Node.getLastChild().getLastChild in interface Nodepublic void setPreviousSibling(Node n)
DOMException.setPreviousSibling in interface ExtendedNodepublic Node getPreviousSibling()
Node.getPreviousSibling().getPreviousSibling in interface Nodepublic void setNextSibling(Node n)
DOMException.setNextSibling in interface ExtendedNodepublic Node getNextSibling()
Node.getNextSibling().getNextSibling in interface Nodepublic boolean hasAttributes()
Node.hasAttributes().hasAttributes in interface Nodepublic NamedNodeMap getAttributes()
Node.getAttributes().getAttributes in interface Nodepublic Document getOwnerDocument()
Node.getOwnerDocument().getOwnerDocument in interface NodeownerDocument.public java.lang.String getNamespaceURI()
Node.getNamespaceURI().getNamespaceURI in interface Nodepublic Node insertBefore(Node newChild, Node refChild) throws DOMException
Node.insertBefore(Node, Node).
Throws a HIERARCHY_REQUEST_ERR DOMException.insertBefore in interface NodeDOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
Node.replaceChild(Node, Node).
Throws a HIERARCHY_REQUEST_ERR DOMException.replaceChild in interface NodeDOMExceptionpublic Node removeChild(Node oldChild) throws DOMException
Node.removeChild(Node).
Throws a HIERARCHY_REQUEST_ERR DOMException.removeChild in interface NodeDOMExceptionpublic Node appendChild(Node newChild) throws DOMException
Node.appendChild(Node).
Throws a HIERARCHY_REQUEST_ERR DOMException.appendChild in interface NodeDOMExceptionpublic boolean hasChildNodes()
Node.hasChildNodes().hasChildNodes in interface Nodepublic Node cloneNode(boolean deep)
Node.cloneNode(boolean).public void normalize()
Node.normalize().
Do nothing.public boolean isSupported(java.lang.String feature,
java.lang.String version)
Node.isSupported(String,String).isSupported in interface Nodepublic java.lang.String getPrefix()
Node.getPrefix().public void setPrefix(java.lang.String prefix)
throws DOMException
Node.setPrefix(String).setPrefix in interface NodeDOMExceptionpublic java.lang.String getLocalName()
Node.getLocalName().getLocalName in interface Nodepublic DOMException createDOMException(short type, java.lang.String key, java.lang.Object[] args)
protected java.lang.String getCascadedXMLBase(Node node)
public java.lang.String getBaseURI()
Node.getBaseURI().getBaseURI in interface Nodepublic static java.lang.String getBaseURI(Node n)
public short compareDocumentPosition(Node other) throws DOMException
Node.compareDocumentPosition(Node).
XXX Doesn't handle notation or entity nodes.compareDocumentPosition in interface NodeDOMExceptionpublic java.lang.String getTextContent()
Node.getTextContent().getTextContent in interface Nodepublic void setTextContent(java.lang.String s)
throws DOMException
Node.setTextContent(String).setTextContent in interface NodeDOMExceptionpublic boolean isSameNode(Node other)
Node.isSameNode(Node).isSameNode in interface Nodepublic java.lang.String lookupPrefix(java.lang.String namespaceURI)
Node.lookupPrefix(String).lookupPrefix in interface Nodeprotected java.lang.String lookupNamespacePrefix(java.lang.String namespaceURI,
Element originalElement)
lookupPrefix(java.lang.String).public boolean isDefaultNamespace(java.lang.String namespaceURI)
Node.isDefaultNamespace(String).isDefaultNamespace in interface Nodepublic java.lang.String lookupNamespaceURI(java.lang.String prefix)
Node.lookupNamespaceURI(String).lookupNamespaceURI in interface Nodepublic boolean isEqualNode(Node other)
Node.isEqualNode(Node).isEqualNode in interface Nodeprotected boolean compareStrings(java.lang.String s1,
java.lang.String s2)
protected boolean compareNamedNodeMaps(NamedNodeMap nnm1, NamedNodeMap nnm2)
public java.lang.Object getFeature(java.lang.String feature,
java.lang.String version)
Node.getFeature(String,String).getFeature in interface Nodepublic java.lang.Object getUserData(java.lang.String key)
Node.getUserData(String).getUserData in interface Nodepublic java.lang.Object setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
Node.setUserData(String,Object,UserDataHandler).setUserData in interface Nodeprotected void fireUserDataHandlers(short type,
Node oldNode,
Node newNode)
public void addEventListener(java.lang.String type,
EventListener listener,
boolean useCapture)
EventTarget.addEventListener(String,EventListener,boolean).addEventListener in interface EventTargetpublic void addEventListenerNS(java.lang.String namespaceURI,
java.lang.String type,
EventListener listener,
boolean useCapture,
java.lang.Object evtGroup)
addEventListenerNS in interface NodeEventTargetnamespaceURI - Specifies the Event.namespaceURI
associated 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
null to attach the event listener to the default
group.public void removeEventListener(java.lang.String type,
EventListener listener,
boolean useCapture)
EventTarget.removeEventListener(String,EventListener,boolean).removeEventListener in interface EventTargetpublic void removeEventListenerNS(java.lang.String namespaceURI,
java.lang.String type,
EventListener listener,
boolean useCapture)
removeEventListenerNS in interface NodeEventTargetnamespaceURI - Specifies the Event.namespaceURI
associated 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.public NodeEventTarget getParentNodeEventTarget()
NodeEventTarget.getParentNodeEventTarget().getParentNodeEventTarget in interface NodeEventTargetpublic boolean dispatchEvent(Event evt) throws EventException
EventTarget.dispatchEvent(Event).dispatchEvent in interface NodeEventTargetdispatchEvent in interface EventTargetevt - The event to be dispatched.Event.preventDefault(). If
Event.preventDefault() was called the returned value
is false, else it is true.EventException - UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event.type
was not specified by initializing the event before
dispatchEvent was called. Specification of the
Event.type as null or an empty string
will also trigger this exception.
Event object is
already being dispatched.public boolean willTriggerNS(java.lang.String namespaceURI,
java.lang.String type)
EventTarget#willTriggerNS(String,String) from an old draft
of DOM Level 3 Events.public boolean hasEventListenerNS(java.lang.String namespaceURI,
java.lang.String type)
EventTarget.hasEventListenerNS(String,String) from an old
draft of DOM Level 3 Events.public EventSupport getEventSupport()
getEventSupport in interface NodeEventTargetpublic EventSupport initializeEventSupport()
public void fireDOMNodeInsertedIntoDocumentEvent()
public void fireDOMNodeRemovedFromDocumentEvent()
protected void fireDOMCharacterDataModifiedEvent(java.lang.String oldv,
java.lang.String newv)
protected AbstractDocument getCurrentDocument()
protected abstract Node newNode()
protected Node export(Node n, AbstractDocument d)
protected Node deepExport(Node n, AbstractDocument d)
protected Node copyInto(Node n)
n - a node of the type of this.protected Node deepCopyInto(Node n)
n - a node of the type of this.protected void checkChildType(Node n, boolean replace)
public Node getXblParentNode()
getXblParentNode in interface NodeXBLpublic NodeList getXblChildNodes()
getXblChildNodes in interface NodeXBLpublic NodeList getXblScopedChildNodes()
getXblScopedChildNodes in interface NodeXBLpublic Node getXblFirstChild()
getXblFirstChild in interface NodeXBLpublic Node getXblLastChild()
getXblLastChild in interface NodeXBLpublic Node getXblPreviousSibling()
getXblPreviousSibling in interface NodeXBLpublic Node getXblNextSibling()
getXblNextSibling in interface NodeXBLpublic Element getXblFirstElementChild()
getXblFirstElementChild in interface NodeXBLpublic Element getXblLastElementChild()
getXblLastElementChild in interface NodeXBLpublic Element getXblPreviousElementSibling()
getXblPreviousElementSibling in interface NodeXBLpublic Element getXblNextElementSibling()
getXblNextElementSibling in interface NodeXBLpublic Element getXblBoundElement()
getXblBoundElement in interface NodeXBLpublic Element getXblShadowTree()
getXblShadowTree in interface NodeXBLpublic NodeList getXblDefinitions()
getXblDefinitions in interface NodeXBLpublic java.lang.Object getManagerData()
getManagerData in interface XBLManagerDatapublic void setManagerData(java.lang.Object data)
setManagerData in interface XBLManagerDataCopyright © 2022 Apache Software Foundation. All Rights Reserved.