hdmf.common.io.table module

class hdmf.common.io.table.DynamicTableMap(spec)

Bases: ObjectMapper

Create a map from AbstractContainer attributes to specifications

Parameters:

spec (DatasetSpec or GroupSpec) – The specification for mapping objects to builders

attr_columns(container, manager)
get_attr_value(spec, container, manager)

Get the value of the attribute corresponding to this spec from the given container

Parameters:
  • spec (Spec) – the spec to get the attribute value for

  • container (DynamicTable) – the container to get the attribute value from

  • manager (BuildManager) – the BuildManager used for managing this build

constructor_args = {'name': <function ObjectMapper.get_container_name>}
obj_attrs = {'colnames': <function DynamicTableMap.attr_columns>}
class hdmf.common.io.table.DynamicTableGenerator(*args, **kwargs)

Bases: CustomClassGenerator

classmethod apply_generator_to_field(field_spec, bases, type_map)

Return True if this is a DynamicTable and the field spec is a column.

classmethod process_field_spec(classdict, docval_args, parent_cls, attr_name, not_inherited_fields, type_map, spec)

Add __columns__ to the classdict and update the docval args for the field spec with the given attribute name. :param classdict: The dict to update with __columns__. :param docval_args: The list of docval arguments. :param parent_cls: The parent class. :param attr_name: The attribute name of the field spec for the container class to generate. :param not_inherited_fields: Dictionary of fields not inherited from the parent class. :param type_map: The type map to use. :param spec: The spec for the container class to generate.

classmethod post_process(classdict, bases, docval_args, spec)

Convert classdict[‘__columns__’] to tuple. :param classdict: The class dictionary. :param bases: The list of base classes. :param docval_args: The dict of docval arguments. :param spec: The spec for the container class to generate.