How to use the hdmf.build.ObjectMapper.object_attr function in hdmf

To help you get started, we’ve selected a few hdmf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.object_attr('related_publications')
    def publication_obj_attr(self, container, manager):
        ret = None
        if isinstance(container.related_publications, str):
            ret = (container.related_publications,)
        return ret
github NeurodataWithoutBorders / pynwb / src / pynwb / io / core.py View on Github external
    @ObjectMapper.object_attr('colnames')
    def attr_columns(self, container, manager):
        if all(len(col) == 0 for col in container.columns):
            return tuple()
        return container.colnames
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.object_attr('scratch_containers')
    def scratch_containers(self, container, manager):
        scratch = container.scratch
        ret = list()
        for s in scratch.values():
            if not isinstance(s, ScratchData):
                ret.append(s)
        return ret
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.object_attr('scratch_datas')
    def scratch_datas(self, container, manager):
        scratch = container.scratch
        ret = list()
        for s in scratch.values():
            if isinstance(s, ScratchData):
                ret.append(s)
        return ret
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.object_attr('experimenter')
    def experimenter_obj_attr(self, container, manager):
        ret = None
        if isinstance(container.experimenter, str):
            ret = (container.experimenter,)
        return ret