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) shortcompareDocumentPosition(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) shortThe 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) booleanbooleaninsertBefore(Node node, Node node1) booleanisDefaultNamespace(String string) booleanisEqualNode(Node node) booleanisSameNode(Node node) booleanisSupported(String string, String string1) lookupNamespaceURI(String string) lookupPrefix(String string) voidprotected StrutsExceptionremoveChild(Node node) replaceChild(Node node, Node node1) voidsetAdapterFactory(AdapterFactory adapterFactory) protected voidsetContext(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, Object value) voidsetNodeValue(String string) voidsetParent(AdapterNode parent) voidvoidsetPropertyName(String name) voidsetPropertyValue(Object prop) voidsetTextContent(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:AdapterNodeThe child node after the specified sibling- Specified by:
getChildAfterin interfaceAdapterNode- Parameters:
child- this node- Returns:
- the child node after
-
getChildBefore
Description copied from interface:AdapterNodeThe child node before the specified sibling- Specified by:
getChildBeforein interfaceAdapterNode- Parameters:
child- this node- Returns:
- the child node before
-
getElementsByTagName
-
getElementsByTagNameNS
-
getAttributes
- Specified by:
getAttributesin interfaceNode
-
getChildNodes
- Specified by:
getChildNodesin interfaceNode
-
getFirstChild
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
- Specified by:
getLastChildin interfaceNode
-
getLocalName
- Specified by:
getLocalNamein interfaceNode
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNode
-
setNodeValue
- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
getNodeValue
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException
-
getOwnerDocument
- Specified by:
getOwnerDocumentin interfaceNode
-
getParentNode
- Specified by:
getParentNodein interfaceNode
-
getParent
Description copied from interface:AdapterNodeThe 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:
getParentin interfaceAdapterNode- Returns:
- the parent adapter node
-
setParent
- Specified by:
setParentin 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:AdapterNodeThe Java object (property) that we are adapting- Specified by:
getPropertyValuein interfaceAdapterNode- Returns:
- the property object
-
setPropertyValue
- Specified by:
setPropertyValuein interfaceAdapterNode- Parameters:
prop- the Java object (property) that we are adapting
-
setPrefix
- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
getPrefix
-
getNextSibling
- Specified by:
getNextSiblingin interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSiblingin interfaceNode
-
getPropertyName
Description copied from interface:AdapterNodeThe name of the Java object (property) that we are adapting- Specified by:
getPropertyNamein interfaceAdapterNode- Returns:
- the property name
-
setPropertyName
- Specified by:
setPropertyNamein interfaceAdapterNode- Parameters:
name- the name of the Java object (property) that we are adapting
-
getAdapterFactory
Description copied from interface:AdapterNodeThe adapter factory that created this node.- Specified by:
getAdapterFactoryin interfaceAdapterNode- Returns:
- the adapter factory
-
setAdapterFactory
- Specified by:
setAdapterFactoryin interfaceAdapterNode- Parameters:
adapterFactory- the adapter factory that created this node.
-
isSupported
- Specified by:
isSupportedin interfaceNode
-
appendChild
- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
cloneNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributesin interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodesin interfaceNode
-
insertBefore
- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
normalize
public void normalize() -
removeChild
- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
isDefaultNamespace
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURIin interfaceNode
-
getNodeName
- Specified by:
getNodeNamein interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeTypein interfaceNode
-
getBaseURI
- Specified by:
getBaseURIin interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNodein interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefixin interfaceNode
-
isEqualNode
- Specified by:
isEqualNodein interfaceNode
-
getFeature
- Specified by:
getFeaturein interfaceNode
-
setUserData
- Specified by:
setUserDatain interfaceNode
-
getUserData
- Specified by:
getUserDatain interfaceNode
-
operationNotSupported
-
toString
-