FileDocCategorySizeDatePackage
ProxyNodeAdapter.javaAPI DocExample4251Mon Jul 23 13:26:44 BST 2007org.apache.struts2.views.xslt

ProxyNodeAdapter

public abstract class ProxyNodeAdapter extends AbstractAdapterNode
ProxyNodeAdapter is a read-only delegating adapter for objects which already implement the Node 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.

Fields Summary
private Log
log
Constructors Summary
public ProxyNodeAdapter(AdapterFactory factory, AdapterNode parent, Node value)


           
        setContext(factory, parent, "document"/*propname unused*/, value);
        log.debug("proxied node is: " + value);
        log.debug("node class is: " + value.getClass());
        log.debug("node type is: " + value.getNodeType());
        log.debug("node name is: " + value.getNodeName());
    
Methods Summary
public org.w3c.dom.NamedNodeMapgetAttributes()

        NamedNodeMap nnm = wrap(node().getAttributes());
        if (log.isTraceEnabled())
            log.trace("getAttributes: " + nnm);
        return nnm;
    
public java.lang.StringgetLocalName()

        log.trace("getLocalName");
        return node().getLocalName();
    
public java.lang.StringgetNamespaceURI()

        log.trace("getNamespaceURI");
        return node().getNamespaceURI();
    
public java.lang.StringgetNodeName()

        log.trace("getNodeName");
        return node().getNodeName();
    
public shortgetNodeType()

        if (log.isTraceEnabled())
            log.trace("getNodeType: " + getNodeName() + ": " + node().getNodeType());
        return node().getNodeType();
    
public java.lang.StringgetNodeValue()

        log.trace("getNodeValue");
        return node().getNodeValue();
    
public java.lang.StringgetPrefix()

        log.trace("getPrefix");
        return node().getPrefix();
    
public booleanhasAttributes()

        log.trace("hasAttributes");
        return node().hasAttributes();
    
public booleanhasChildNodes()

        log.trace("hasChildNodes");
        return node().hasChildNodes();
    
public booleanisSupported(java.lang.String s, java.lang.String s1)

        log.trace("isSupported");
        // Is this ok?  What kind of features are they asking about?
        return node().isSupported(s, s1);
    
protected org.w3c.dom.Nodenode()
Get the proxied Node value

        return (Node) getPropertyValue();
    
public java.lang.StringtoString()

        return "ProxyNode for: " + node();
    
protected org.w3c.dom.Nodewrap(org.w3c.dom.Node node)
Get and adapter to wrap the proxied node.

param
node

        return getAdapterFactory().proxyNode(this, node);
    
protected org.w3c.dom.NamedNodeMapwrap(org.w3c.dom.NamedNodeMap nnm)

        return getAdapterFactory().proxyNamedNodeMap(this, nnm);