public abstract class BaseXMLNode extends Object implements INode, IContentProvider
Node
to a CAF tree INode
and CAF data IContentProvider
(as a IContentProvider
,
binding-expression access to the node's properties can be optimized).Modifier and Type | Field and Description |
---|---|
protected List<INode> |
m_children
Lazily created by
INode.getChildren() . |
protected String |
m_id
Lazily created by
INode.getId() . |
protected INode |
m_parent
Null if root.
|
protected org.apache.xpath.CachedXPathAPI |
m_xpathAPI
Lazily created by
getXPathAPI() . |
protected Map<String,Object> |
m_xpathCache
Lazily created cache of xpaths to evaluated results.
|
Constructor and Description |
---|
BaseXMLNode() |
Modifier and Type | Method and Description |
---|---|
Object |
getData()
Row data.
|
INode |
getParent()
Node parent, or null for root.
|
Object[] |
getPropertyKeys()
Returns list of properties supported by this content provider.
|
Class<?> |
getType(Object propertyKey)
Returns java type of the given property
|
Object |
getValue(Object propertyKey)
Returns value of the given property
|
protected abstract Node |
getXMLNode()
Wrapped DOM node.
|
protected org.apache.xpath.CachedXPathAPI |
getXPathAPI()
Xalan xpath api context.
|
protected Object |
getXPathValue(String xpath)
Evaluates the specified xpath for the wrapped dom node.
|
boolean |
hasProperty(Object propertyKey)
Checks if the given property is supported by this content provider
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getId
toString
protected org.apache.xpath.CachedXPathAPI m_xpathAPI
getXPathAPI()
.protected Map<String,Object> m_xpathCache
protected String m_id
INode.getId()
.protected INode m_parent
protected List<INode> m_children
INode.getChildren()
.public INode getParent()
INode
public Object[] getPropertyKeys()
IContentProvider
Object[0]
,
never null.getPropertyKeys
in interface IContentProvider
String
or Integer
public Class<?> getType(Object propertyKey) throws PropertyNotFoundException
IContentProvider
getType
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
Class
PropertyNotFoundException
- if property is not supportedpublic Object getValue(Object propertyKey) throws ELException, PropertyNotFoundException
IContentProvider
getValue
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
null
PropertyNotFoundException
- if property is not supportedELException
public boolean hasProperty(Object propertyKey)
IContentProvider
hasProperty
in interface IContentProvider
propertyKey
- property key of type String
or Integer
true
if property is supportedprotected abstract Node getXMLNode()
protected org.apache.xpath.CachedXPathAPI getXPathAPI()
protected Object getXPathValue(String xpath) throws TransformerException
TransformerException