Skip to content

DataTreeShell

Hika van den Hoven edited this page Jun 27, 2016 · 16 revisions

#The DataTreeShell wrapper class This is a wrapper class around DATAtree/HTMLtree/JSONtree. It offers some pre- and post-processing functionality and auto-selection between JSON and HTML. The DATAtree once initialized can be accessed trough the .searchtree attribute. While the DATAtree classes focus on the data to be read into the tree, DataTreeShell focussus on the data_def with data extraction into and out of the tree being one of the functions.
The following functions in DATAtree are also available here. See there for a description:

* .set_timezone([timezone = None])
* .set_current_date([cdate = None])
* .is_data_value(¨searchpath[, dtype = None, empty_is_false = False])
* .data_value(¨searchpath[, dtype = None, default = None])

It takes the following attributes:

##The Functions ###.init_data_def([data_def = None, init_start_node = True) This gets called on class initialization. But if you want to apply another data_def to the same data, call this function to reinitialize. If no data_def is supplied the current one is reinitialized. It sets the timezone, current_date and reads in the "empty-values" keyword. This is later used by the .link_values() function. If the .searchtree attribute was already initialized (through the .init_data() function) the .searchtree.check_data_def() function is called and if init_start_node = True also the .searchtree.find_start_node() function.

###.get_url([url_data = None])

###.url_functions(urlid[, data = None])

###.add_on_url_functions(urlid[, data = None])

###.init_data(data[, init_start_node = True])

###.extract_datalist([init_start_node = False])

###.link_values(linkdata)

###.link_functions(fid[, data = None, default = None])

###.add_on_link_functions(fid[, data = None, default = None])

##The URL functions

##The Link functions

Clone this wiki locally