The goog.ds.BaseDataNode Class

goog.ds.BaseDataNode()

Base class for data node functionality, has default implementations for many of the functions. implements {goog.ds.DataNode}

.getChildNode(name, opt_canCreate)

Gets a named child node of the current node

name {string}
The node name.
opt_canCreate {boolean=}
Whether you can create the child node if it doesn't exist already.
returns {goog.ds.DataNode}
The child node, or null if no node of this name exists and opt_create is false.

.getChildNodeValue(name)

Gets the value of a child node

name {string}
The node name.
returns {Object}
The value of the node, or null if no value or the child node doesn't exist.

.getChildNodes(opt_selector)

Gets all of the child nodes of the current node. Should return an empty DataNode list if no child nodes.

opt_selector {string=}
String selector to choose child nodes.
returns {goog.ds.DataNodeList}
The child nodes.

.getDataName()

Get the name of the node relative to the parent node

returns {string}
The name of the node.

.getDataPath()

Gets the a qualified data path to this node

returns {string}
The data path.

.getLoadState()

Gets the state of the backing data for this node

returns {goog.ds.LoadState}
The state.

.load

Load or reload the backing data for this node

.set(value)

Set the value of the node

value {Object}
The new value of the node.