org.apache.struts2.views.xslt
Class AbstractAdapterNode

java.lang.Object
  extended by org.apache.struts2.views.xslt.AbstractAdapterNode
All Implemented Interfaces:
AdapterNode, org.w3c.dom.Node
Direct Known Subclasses:
AbstractAdapterElement, ProxyNodeAdapter, SimpleAdapterDocument, SimpleTextNode

public abstract class AbstractAdapterNode
extends java.lang.Object
implements AdapterNode

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:
AbstractAdapterElement

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
AbstractAdapterNode()
           
 
Method Summary
 org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
           
protected  java.util.List<org.w3c.dom.Node> buildChildAdapters()
          subclasses override to produce their children
 org.w3c.dom.Node cloneNode(boolean b)
           
 short compareDocumentPosition(org.w3c.dom.Node node)
           
 AdapterFactory getAdapterFactory()
          The adapter factory that created this node.
 org.w3c.dom.NamedNodeMap getAttributes()
           
 java.lang.String getBaseURI()
           
protected  java.util.List<org.w3c.dom.Node> getChildAdapters()
          Lazily initialize child childAdapters
 org.w3c.dom.Node getChildAfter(org.w3c.dom.Node child)
          The child node after the specified sibling
 org.w3c.dom.Node getChildBefore(org.w3c.dom.Node child)
          The child node before the specified sibling
 org.w3c.dom.Node getChildBeforeOrAfter(org.w3c.dom.Node child, boolean before)
           
 org.w3c.dom.NodeList getChildNodes()
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
           
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String string, java.lang.String string1)
           
 java.lang.Object getFeature(java.lang.String string, java.lang.String string1)
           
 org.w3c.dom.Node getFirstChild()
           
 org.w3c.dom.Node getLastChild()
           
 java.lang.String getLocalName()
           
 java.lang.String getNamespaceURI()
           
 org.w3c.dom.Node getNextSibling()
           
 java.lang.String getNodeName()
           
 short getNodeType()
           
 java.lang.String getNodeValue()
           
 org.w3c.dom.Document getOwnerDocument()
           
 AdapterNode getParent()
          The parent adapter node of this node.
 org.w3c.dom.Node getParentNode()
           
 java.lang.String getPrefix()
           
 org.w3c.dom.Node getPreviousSibling()
           
 java.lang.String getPropertyName()
          The name of the Java object (property) that we are adapting
 java.lang.Object getPropertyValue()
          The Java object (property) that we are adapting
 java.lang.String getTextContent()
           
 java.lang.Object getUserData(java.lang.String string)
           
 boolean hasAttributes()
           
 boolean hasChildNodes()
           
 org.w3c.dom.Node insertBefore(org.w3c.dom.Node node, org.w3c.dom.Node node1)
           
 boolean isDefaultNamespace(java.lang.String string)
           
 boolean isEqualNode(org.w3c.dom.Node node)
           
 boolean isSameNode(org.w3c.dom.Node node)
           
 boolean isSupported(java.lang.String string, java.lang.String string1)
           
 java.lang.String lookupNamespaceURI(java.lang.String string)
           
 java.lang.String lookupPrefix(java.lang.String string)
           
 void normalize()
           
protected  StrutsException operationNotSupported()
           
 org.w3c.dom.Node removeChild(org.w3c.dom.Node node)
           
 org.w3c.dom.Node replaceChild(org.w3c.dom.Node node, org.w3c.dom.Node node1)
           
 void setAdapterFactory(AdapterFactory adapterFactory)
          The adapter factory that created this node.
protected  void setContext(AdapterFactory adapterFactory, AdapterNode parent, java.lang.String propertyName, java.lang.Object value)
           
 void setNodeValue(java.lang.String string)
           
 void setParent(AdapterNode parent)
          The parent adapter node of this node.
 void setPrefix(java.lang.String string)
           
 void setPropertyName(java.lang.String name)
          The name of the Java object (property) that we are adapting
 void setPropertyValue(java.lang.Object prop)
          The Java object (property) that we are adapting
 void setTextContent(java.lang.String string)
           
 java.lang.Object setUserData(java.lang.String string, java.lang.Object object, org.w3c.dom.UserDataHandler userDataHandler)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAdapterNode

public AbstractAdapterNode()
Method Detail

setContext

protected void setContext(AdapterFactory adapterFactory,
                          AdapterNode parent,
                          java.lang.String propertyName,
                          java.lang.Object value)
Parameters:
adapterFactory -
parent -
propertyName -
value -

buildChildAdapters

protected java.util.List<org.w3c.dom.Node> buildChildAdapters()
subclasses override to produce their children

Returns:
List of child adapters.

getChildAdapters

protected java.util.List<org.w3c.dom.Node> getChildAdapters()
Lazily initialize child childAdapters


getChildBeforeOrAfter

public org.w3c.dom.Node getChildBeforeOrAfter(org.w3c.dom.Node child,
                                              boolean before)

getChildAfter

public org.w3c.dom.Node getChildAfter(org.w3c.dom.Node child)
Description copied from interface: AdapterNode
The child node after the specified sibling

Specified by:
getChildAfter in interface AdapterNode

getChildBefore

public org.w3c.dom.Node getChildBefore(org.w3c.dom.Node child)
Description copied from interface: AdapterNode
The child node before the specified sibling

Specified by:
getChildBefore in interface AdapterNode

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String string,
                                                   java.lang.String string1)

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Specified by:
getAttributes in interface org.w3c.dom.Node

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
Specified by:
getChildNodes in interface org.w3c.dom.Node

getFirstChild

public org.w3c.dom.Node getFirstChild()
Specified by:
getFirstChild in interface org.w3c.dom.Node

getLastChild

public org.w3c.dom.Node getLastChild()
Specified by:
getLastChild in interface org.w3c.dom.Node

getLocalName

public java.lang.String getLocalName()
Specified by:
getLocalName in interface org.w3c.dom.Node

getNamespaceURI

public java.lang.String getNamespaceURI()
Specified by:
getNamespaceURI in interface org.w3c.dom.Node

setNodeValue

public void setNodeValue(java.lang.String string)
                  throws org.w3c.dom.DOMException
Specified by:
setNodeValue in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

getNodeValue

public java.lang.String getNodeValue()
                              throws org.w3c.dom.DOMException
Specified by:
getNodeValue in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
Specified by:
getOwnerDocument in interface org.w3c.dom.Node

getParentNode

public org.w3c.dom.Node getParentNode()
Specified by:
getParentNode in interface org.w3c.dom.Node

getParent

public AdapterNode 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 interface AdapterNode

setParent

public void setParent(AdapterNode parent)
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:
setParent in interface AdapterNode

getPropertyValue

public java.lang.Object getPropertyValue()
Description copied from interface: AdapterNode
The Java object (property) that we are adapting

Specified by:
getPropertyValue in interface AdapterNode

setPropertyValue

public void setPropertyValue(java.lang.Object prop)
Description copied from interface: AdapterNode
The Java object (property) that we are adapting

Specified by:
setPropertyValue in interface AdapterNode

setPrefix

public void setPrefix(java.lang.String string)
               throws org.w3c.dom.DOMException
Specified by:
setPrefix in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface org.w3c.dom.Node

getNextSibling

public org.w3c.dom.Node getNextSibling()
Specified by:
getNextSibling in interface org.w3c.dom.Node

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
Specified by:
getPreviousSibling in interface org.w3c.dom.Node

getPropertyName

public java.lang.String getPropertyName()
Description copied from interface: AdapterNode
The name of the Java object (property) that we are adapting

Specified by:
getPropertyName in interface AdapterNode

setPropertyName

public void setPropertyName(java.lang.String name)
Description copied from interface: AdapterNode
The name of the Java object (property) that we are adapting

Specified by:
setPropertyName in interface AdapterNode

getAdapterFactory

public AdapterFactory getAdapterFactory()
Description copied from interface: AdapterNode
The adapter factory that created this node.

Specified by:
getAdapterFactory in interface AdapterNode

setAdapterFactory

public void setAdapterFactory(AdapterFactory adapterFactory)
Description copied from interface: AdapterNode
The adapter factory that created this node.

Specified by:
setAdapterFactory in interface AdapterNode

isSupported

public boolean isSupported(java.lang.String string,
                           java.lang.String string1)
Specified by:
isSupported in interface org.w3c.dom.Node

appendChild

public org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
                             throws org.w3c.dom.DOMException
Specified by:
appendChild in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

cloneNode

public org.w3c.dom.Node cloneNode(boolean b)
Specified by:
cloneNode in interface org.w3c.dom.Node

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface org.w3c.dom.Node

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface org.w3c.dom.Node

insertBefore

public org.w3c.dom.Node insertBefore(org.w3c.dom.Node node,
                                     org.w3c.dom.Node node1)
                              throws org.w3c.dom.DOMException
Specified by:
insertBefore in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

normalize

public void normalize()
Specified by:
normalize in interface org.w3c.dom.Node

removeChild

public org.w3c.dom.Node removeChild(org.w3c.dom.Node node)
                             throws org.w3c.dom.DOMException
Specified by:
removeChild in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

replaceChild

public org.w3c.dom.Node replaceChild(org.w3c.dom.Node node,
                                     org.w3c.dom.Node node1)
                              throws org.w3c.dom.DOMException
Specified by:
replaceChild in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

isDefaultNamespace

public boolean isDefaultNamespace(java.lang.String string)
Specified by:
isDefaultNamespace in interface org.w3c.dom.Node

lookupNamespaceURI

public java.lang.String lookupNamespaceURI(java.lang.String string)
Specified by:
lookupNamespaceURI in interface org.w3c.dom.Node

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.w3c.dom.Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node

getBaseURI

public java.lang.String getBaseURI()
Specified by:
getBaseURI in interface org.w3c.dom.Node

compareDocumentPosition

public short compareDocumentPosition(org.w3c.dom.Node node)
                              throws org.w3c.dom.DOMException
Specified by:
compareDocumentPosition in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

getTextContent

public java.lang.String getTextContent()
                                throws org.w3c.dom.DOMException
Specified by:
getTextContent in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

setTextContent

public void setTextContent(java.lang.String string)
                    throws org.w3c.dom.DOMException
Specified by:
setTextContent in interface org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException

isSameNode

public boolean isSameNode(org.w3c.dom.Node node)
Specified by:
isSameNode in interface org.w3c.dom.Node

lookupPrefix

public java.lang.String lookupPrefix(java.lang.String string)
Specified by:
lookupPrefix in interface org.w3c.dom.Node

isEqualNode

public boolean isEqualNode(org.w3c.dom.Node node)
Specified by:
isEqualNode in interface org.w3c.dom.Node

getFeature

public java.lang.Object getFeature(java.lang.String string,
                                   java.lang.String string1)
Specified by:
getFeature in interface org.w3c.dom.Node

setUserData

public java.lang.Object setUserData(java.lang.String string,
                                    java.lang.Object object,
                                    org.w3c.dom.UserDataHandler userDataHandler)
Specified by:
setUserData in interface org.w3c.dom.Node

getUserData

public java.lang.Object getUserData(java.lang.String string)
Specified by:
getUserData in interface org.w3c.dom.Node

operationNotSupported

protected StrutsException operationNotSupported()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.