How to use the hdmf.build.ObjectMapper.constructor_arg 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.constructor_arg('date_of_birth')
    def dateconversion(self, builder, manager):
        dob_builder = builder.get('date_of_birth')
        if dob_builder is None:
            return
        else:
            datestr = dob_builder.data
            date = dateutil_parse(datestr)
            return date
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.constructor_arg('scratch')
    def scratch(self, builder, manager):
        scratch = builder.get('scratch')
        ret = list()
        if scratch is not None:
            for g in scratch.groups.values():
                ret.append(manager.construct(g))
            for d in scratch.datasets.values():
                ret.append(manager.construct(d))
        return tuple(ret) if len(ret) > 0 else None
github NeurodataWithoutBorders / pynwb / src / pynwb / io / core.py View on Github external
    @ObjectMapper.constructor_arg('name')
    def carg_name(self, builder, manager):
        return builder.name
github NeurodataWithoutBorders / pynwb / src / pynwb / io / core.py View on Github external
    @ObjectMapper.constructor_arg('data')
    def carg_data(self, builder, manager):
        return builder.data
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.constructor_arg('file_create_date')
    def dateconversion_list(self, builder, manager):
        datestr = builder.get('file_create_date').data
        dates = list(map(dateutil_parse, datestr))
        return dates
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.constructor_arg('timestamps_reference_time')
    def dateconversion_trt(self, builder, manager):
        datestr = builder.get('timestamps_reference_time').data
        date = dateutil_parse(datestr)
        return date
github NeurodataWithoutBorders / pynwb / src / pynwb / io / file.py View on Github external
    @ObjectMapper.constructor_arg('session_start_time')
    def dateconversion(self, builder, manager):
        datestr = builder.get('session_start_time').data
        date = dateutil_parse(datestr)
        return date