Package svs_core :: Package utilities :: Module lib :: Class PathBasedCollection
[show private | hide private]
[frames | no frames]

Class PathBasedCollection


Holds data in a nested structure that can be accessed via pathnames.

The pathnames are defined as list objects which represent a series of nodes.
Method Summary
  __init__(self)
  __str__(self)
  addEntry(self, path, data)
Adds entry to collection.
list get(self, path, defaultReturn)
Checks for data at specified path and returns as list if found.

Class Variable Summary
str dataKey = '__data'

Method Details

addEntry(self, path, data)

Adds entry to collection.
Parameters:
path - nodes address for data
           (type=list)
data - data to be stored
           (type=object)

get(self, path, defaultReturn=[])

Checks for data at specified path and returns as list if found.

If no data is found at specified path, returns an empty list or the specified defaulrReturn object.
Parameters:
path - path to serach for data
           (type=list)
defaultReturn - returne if nothing found
           (type=object)
Returns:
data at specified path location
           (type=list)

Class Variable Details

dataKey

Type:
str
Value:
'__data'                                                               

Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 http://epydoc.sf.net