| |
- exceptions.Exception(exceptions.BaseException)
-
- DuplicateClsException
- NoAttributeException
- NoClsException
- ClsTemplate
- Schema
- SchemaReader
class ClsTemplate |
|
Seperate from a class instance; has attribute information, but not SOURCE information.
Mapper should use this class to translate Tuple data into actual instances.
Note that the setting of parents/children involve calling the parameter parent/child's
own set child/parent method; setting the parent/child for a ClsTemplate should automatically
set the corresponding child/parent for the other ClsTemplate involved. |
|
Methods defined here:
- __init__(self, name, par=None, att=None)
- __repr__(self)
- add_child(self, c_template)
- add_parent(self, p_template)
- cls_name(self)
- get_all_attributes(self)
- get_attribute(self, attr)
- get_attributes_list(self)
- get_children(self)
- get_local_attribute(self, attr)
- get_parents(self)
- has_attribute(self, attr)
- has_child(self, c)
- has_parent(self, p)
- list_all_attributes(self)
- list_local_attributes(self)
- remove_child(self, c)
- remove_parent(self, p)
- set_attribute(self, attr, arity=0)
Data descriptors defined here:
- attributes
- name
Data and other attributes defined here:
- MULTIPLE = 1
- SINGULAR = 0
|
class Schema |
|
Class that contains the instances of ClsTemplate. This class is sort of
like a big, wrapping memoization, with a root cls. |
|
Methods defined here:
- __init__(self)
- add_cls(self, cls, overwrite=False)
- Adds a ClsTemplate to schema as a child of root.
- cls_has_child_cls_str(self, p_cls_str, c_cls_str)
- Returns True if p_cls is a parent of c_cls; False otherwise.
- get_all_clses(self)
- Returns a breadth-first ordering of all clses in Schema.
- get_cls(self, cls_name)
- Parameter is a string.
- has_cls(self, cls)
- has_cls_by_name(self, cls_str)
- reindex(self)
- root(self)
Data and other attributes defined here:
- ID = '#ID'
- ROOT_STR = 'ROOT'
- SOURCE = '#SOURCE'
|
|