Package org.apache.dvsl.dom4j
Class Dom4jNodeImpl
- java.lang.Object
-
- org.apache.dvsl.dom4j.Dom4jNodeImpl
-
- All Implemented Interfaces:
DVSLNode
public class Dom4jNodeImpl extends java.lang.Object implements DVSLNode
wrapper class for dom4j nodes to implement the DVSLNode interface for template use- Author:
- Geir Magnusson Jr.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Mapattributesprotected org.dom4j.Nodeelement
-
Constructor Summary
Constructors Modifier Constructor Description privateDom4jNodeImpl()Dom4jNodeImpl(org.dom4j.Attribute e)Dom4jNodeImpl(org.dom4j.CDATA e)Dom4jNodeImpl(org.dom4j.Comment e)Dom4jNodeImpl(org.dom4j.Document e)Dom4jNodeImpl(org.dom4j.Element e)this is a bit yecchy - need to revampDom4jNodeImpl(org.dom4j.Text e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringattrib(java.lang.String name)returns attributejava.lang.Stringattribute(java.lang.String attribute)returns a specificed attributeattributejava.util.Listchildren()returns a list of all children of the current nodejava.lang.Stringcopy()renders a deep copy of the XML tree below the current node to the outputjava.lang.Stringcopy(java.util.List nodes)assumes a list of DVSLNodesprivate voidcopy(org.dom4j.Node node, java.io.Writer writer)DVSLNodeget(java.lang.String xpath)java.util.MapgetAttribMap()java.lang.ObjectgetNodeImpl()returns the object corresponding to the node in the implementaion that we are using.private DVSLNodemakeDVSLNode(org.dom4j.Node n)will recast all of this laterjava.lang.Stringname()returns the name of the nodejava.lang.Stringrender()java.util.ListselectNodes(java.lang.String xpath)returns a list of nodes that satisfy the xpathDVSLNodeselectSingleNode(java.lang.String xpath)returns a single node that satisfies the xpathjava.lang.StringtoString()returns the 'value' of the nodejava.lang.Stringvalue()returns the 'value' of the nodejava.lang.ObjectvalueOf(java.lang.String xpath)returns the value of the XPAth expression
-
-
-
Constructor Detail
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.Element e)
this is a bit yecchy - need to revamp
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.Document e)
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.Text e)
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.Attribute e)
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.Comment e)
-
Dom4jNodeImpl
public Dom4jNodeImpl(org.dom4j.CDATA e)
-
Dom4jNodeImpl
private Dom4jNodeImpl()
-
-
Method Detail
-
name
public java.lang.String name()
returns the name of the node
-
attribute
public java.lang.String attribute(java.lang.String attribute)
returns a specificed attributeattribute
-
selectNodes
public java.util.List selectNodes(java.lang.String xpath)
returns a list of nodes that satisfy the xpath- Specified by:
selectNodesin interfaceDVSLNode
-
selectSingleNode
public DVSLNode selectSingleNode(java.lang.String xpath)
Description copied from interface:DVSLNodereturns a single node that satisfies the xpath- Specified by:
selectSingleNodein interfaceDVSLNode
-
value
public java.lang.String value()
Description copied from interface:DVSLNodereturns the 'value' of the node
-
valueOf
public java.lang.Object valueOf(java.lang.String xpath)
Description copied from interface:DVSLNodereturns the value of the XPAth expression
-
toString
public java.lang.String toString()
Description copied from interface:DVSLNodereturns the 'value' of the node
-
children
public java.util.List children()
Description copied from interface:DVSLNodereturns a list of all children of the current node
-
copy
public java.lang.String copy(java.util.List nodes)
assumes a list of DVSLNodes
-
copy
public java.lang.String copy()
Description copied from interface:DVSLNoderenders a deep copy of the XML tree below the current node to the output
-
copy
private void copy(org.dom4j.Node node, java.io.Writer writer)
-
render
public java.lang.String render()
-
attrib
public java.lang.String attrib(java.lang.String name)
Description copied from interface:DVSLNodereturns attribute
-
getNodeImpl
public java.lang.Object getNodeImpl()
Description copied from interface:DVSLNodereturns the object corresponding to the node in the implementaion that we are using. use only with the greatest of care- Specified by:
getNodeImplin interfaceDVSLNode
-
getAttribMap
public java.util.Map getAttribMap()
- Specified by:
getAttribMapin interfaceDVSLNode
-
makeDVSLNode
private DVSLNode makeDVSLNode(org.dom4j.Node n)
will recast all of this later
-
-