org.apache.struts2.views.xslt
Class ProxyElementAdapter

java.lang.Object
  extended by org.apache.struts2.views.xslt.AbstractAdapterNode
      extended by org.apache.struts2.views.xslt.ProxyNodeAdapter
          extended by org.apache.struts2.views.xslt.ProxyElementAdapter
All Implemented Interfaces:
AdapterNode, org.w3c.dom.Element, org.w3c.dom.Node

public class ProxyElementAdapter
extends ProxyNodeAdapter
implements org.w3c.dom.Element

ProxyElementAdapter is a pass-through adapter for objects which already implement the Element interface. All methods are proxied to the underlying Node except getParent(), getNextSibling() and getPreviousSibling(), which are implemented by the abstract adapter node to work with the parent adapter. Note: this class wants to be (extend) both an AbstractElementAdapter and ProxyElementAdapter, but its proxy-ness is winning right now.


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
ProxyElementAdapter(AdapterFactory factory, AdapterNode parent, org.w3c.dom.Element value)
           
 
Method Summary
protected  java.util.List<org.w3c.dom.Node> buildChildAdapters()
          subclasses override to produce their children
protected  org.w3c.dom.Element element()
          Get the proxied Element
 java.lang.String getAttribute(java.lang.String name)
           
 org.w3c.dom.Attr getAttributeNode(java.lang.String name)
           
 org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
           
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
           
 org.w3c.dom.TypeInfo getSchemaTypeInfo()
           
 java.lang.String getTagName()
           
 boolean hasAttribute(java.lang.String name)
           
 boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 void removeAttribute(java.lang.String name)
           
 org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
           
 void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
           
 org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
           
 void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
           
 void setIdAttribute(java.lang.String string, boolean b)
           
 void setIdAttributeNode(org.w3c.dom.Attr attr, boolean b)
           
 void setIdAttributeNS(java.lang.String string, java.lang.String string1, boolean b)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.struts2.views.xslt.ProxyNodeAdapter
getAttributes, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getPrefix, hasAttributes, hasChildNodes, isSupported, node, wrap, wrap
 
Methods inherited from class org.apache.struts2.views.xslt.AbstractAdapterNode
appendChild, cloneNode, compareDocumentPosition, getAdapterFactory, getBaseURI, getChildAdapters, getChildAfter, getChildBefore, getChildBeforeOrAfter, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getPropertyName, getPropertyValue, getTextContent, getUserData, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, normalize, operationNotSupported, removeChild, replaceChild, setAdapterFactory, setContext, setNodeValue, setParent, setPrefix, setPropertyName, setPropertyValue, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

ProxyElementAdapter

public ProxyElementAdapter(AdapterFactory factory,
                           AdapterNode parent,
                           org.w3c.dom.Element value)
Method Detail

element

protected org.w3c.dom.Element element()
Get the proxied Element


buildChildAdapters

protected java.util.List<org.w3c.dom.Node> buildChildAdapters()
Description copied from class: AbstractAdapterNode
subclasses override to produce their children

Overrides:
buildChildAdapters in class AbstractAdapterNode
Returns:
List of child adapters.

getTagName

public java.lang.String getTagName()
Specified by:
getTagName in interface org.w3c.dom.Element

hasAttribute

public boolean hasAttribute(java.lang.String name)
Specified by:
hasAttribute in interface org.w3c.dom.Element

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Specified by:
getAttribute in interface org.w3c.dom.Element

hasAttributeNS

public boolean hasAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Specified by:
hasAttributeNS in interface org.w3c.dom.Element

getAttributeNode

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
Specified by:
getAttributeNode in interface org.w3c.dom.Element

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
Specified by:
getElementsByTagName in interface org.w3c.dom.Element
Overrides:
getElementsByTagName in class AbstractAdapterNode

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Specified by:
getAttributeNS in interface org.w3c.dom.Element

getAttributeNodeNS

public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
                                           java.lang.String localName)
Specified by:
getAttributeNodeNS in interface org.w3c.dom.Element

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Element
Overrides:
getElementsByTagNameNS in class AbstractAdapterNode

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws org.w3c.dom.DOMException
Specified by:
removeAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

removeAttributeNS

public void removeAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws org.w3c.dom.DOMException
Specified by:
removeAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws org.w3c.dom.DOMException
Specified by:
setAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

removeAttributeNode

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
                                     throws org.w3c.dom.DOMException
Specified by:
removeAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNode

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr newAttr)
                                  throws org.w3c.dom.DOMException
Specified by:
setAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNodeNS

public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr newAttr)
                                    throws org.w3c.dom.DOMException
Specified by:
setAttributeNodeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNS

public void setAttributeNS(java.lang.String namespaceURI,
                           java.lang.String qualifiedName,
                           java.lang.String value)
                    throws org.w3c.dom.DOMException
Specified by:
setAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

getSchemaTypeInfo

public org.w3c.dom.TypeInfo getSchemaTypeInfo()
Specified by:
getSchemaTypeInfo in interface org.w3c.dom.Element

setIdAttribute

public void setIdAttribute(java.lang.String string,
                           boolean b)
                    throws org.w3c.dom.DOMException
Specified by:
setIdAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setIdAttributeNS

public void setIdAttributeNS(java.lang.String string,
                             java.lang.String string1,
                             boolean b)
                      throws org.w3c.dom.DOMException
Specified by:
setIdAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setIdAttributeNode

public void setIdAttributeNode(org.w3c.dom.Attr attr,
                               boolean b)
                        throws org.w3c.dom.DOMException
Specified by:
setIdAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

toString

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


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