Package org.apache.struts2.result.xslt
Class AbstractAdapterNode
java.lang.Object
org.apache.struts2.result.xslt.AbstractAdapterNode
- All Implemented Interfaces:
AdapterNode
,Node
- Direct Known Subclasses:
AbstractAdapterElement
,ProxyNodeAdapter
,SimpleAdapterDocument
,SimpleTextNode
AbstractAdapterNode is the base for childAdapters that expose a read-only view
of a Java object as a DOM Node. This class implements the core parent-child
and sibling node traversal functionality shared by all adapter type nodes
and used in proxy node support.
- See Also:
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node node) subclasses override to produce their childrencloneNode
(boolean b) short
compareDocumentPosition
(Node node) The adapter factory that created this node.Lazily initialize child adaptersgetChildAfter
(Node child) The child node after the specified siblinggetChildBefore
(Node child) The child node before the specified siblinggetChildBeforeOrAfter
(Node child, boolean before) getElementsByTagName
(String tagName) getElementsByTagNameNS
(String string, String string1) getFeature
(String string, String string1) short
The parent adapter node of this node.The name of the Java object (property) that we are adaptingThe Java object (property) that we are adaptinggetUserData
(String string) boolean
boolean
insertBefore
(Node node, Node node1) boolean
isDefaultNamespace
(String string) boolean
isEqualNode
(Node node) boolean
isSameNode
(Node node) boolean
isSupported
(String string, String string1) lookupNamespaceURI
(String string) lookupPrefix
(String string) void
protected StrutsException
removeChild
(Node node) replaceChild
(Node node, Node node1) void
setAdapterFactory
(AdapterFactory adapterFactory) protected void
setContext
(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, Object value) void
setNodeValue
(String string) void
setParent
(AdapterNode parent) void
void
setPropertyName
(String name) void
setPropertyValue
(Object prop) void
setTextContent
(String string) setUserData
(String string, Object object, UserDataHandler userDataHandler) toString()
-
Constructor Details
-
AbstractAdapterNode
protected AbstractAdapterNode()
-
-
Method Details
-
setContext
protected void setContext(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, Object value) - Parameters:
adapterFactory
- the adapter factoryparent
- the parent adapter nodepropertyName
- the property namevalue
- value
-
buildChildAdapters
subclasses override to produce their children- Returns:
- List of child adapters.
-
getChildAdapters
Lazily initialize child adapters- Returns:
- node list
-
getChildBeforeOrAfter
-
getChildAfter
Description copied from interface:AdapterNode
The child node after the specified sibling- Specified by:
getChildAfter
in interfaceAdapterNode
- Parameters:
child
- this node- Returns:
- the child node after
-
getChildBefore
Description copied from interface:AdapterNode
The child node before the specified sibling- Specified by:
getChildBefore
in interfaceAdapterNode
- Parameters:
child
- this node- Returns:
- the child node before
-
getElementsByTagName
-
getElementsByTagNameNS
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNode
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getParent
Description copied from interface:AdapterNode
The parent adapter node of this node. Note that our parent must be another adapter node, but our children may be any kind of Node.- Specified by:
getParent
in interfaceAdapterNode
- Returns:
- the parent adapter node
-
setParent
- Specified by:
setParent
in interfaceAdapterNode
- Parameters:
parent
- the parent adapter node of this node. Note that our parent must be another adapter node, but our children may be any kind of Node.
-
getPropertyValue
Description copied from interface:AdapterNode
The Java object (property) that we are adapting- Specified by:
getPropertyValue
in interfaceAdapterNode
- Returns:
- the property object
-
setPropertyValue
- Specified by:
setPropertyValue
in interfaceAdapterNode
- Parameters:
prop
- the Java object (property) that we are adapting
-
setPrefix
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
getPrefix
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
getPropertyName
Description copied from interface:AdapterNode
The name of the Java object (property) that we are adapting- Specified by:
getPropertyName
in interfaceAdapterNode
- Returns:
- the property name
-
setPropertyName
- Specified by:
setPropertyName
in interfaceAdapterNode
- Parameters:
name
- the name of the Java object (property) that we are adapting
-
getAdapterFactory
Description copied from interface:AdapterNode
The adapter factory that created this node.- Specified by:
getAdapterFactory
in interfaceAdapterNode
- Returns:
- the adapter factory
-
setAdapterFactory
- Specified by:
setAdapterFactory
in interfaceAdapterNode
- Parameters:
adapterFactory
- the adapter factory that created this node.
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
cloneNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
normalize
public void normalize() -
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
operationNotSupported
-
toString
-