Group¶
Adapter for NWB groups to linkml Classes
- class GroupAdapter(*, TYPE: ~typing.Type = <class 'nwb_schema_language.datamodel.nwb_schema_pydantic.Group'>, cls: ~nwb_schema_language.datamodel.nwb_schema_pydantic.Group, parent: ~nwb_linkml.adapters.classes.ClassAdapter | None = None)¶
Adapt NWB Groups to LinkML Classes
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- build() BuildResult¶
Do the translation, yielding the BuildResult
- handle_container_group(cls: Group) BuildResult¶
Make a special LinkML children slot that can have any number of the objects that are of neurodata_type_inc class
Examples
- name: templates groups: - neurodata_type_inc: TimeSeries doc: TimeSeries objects containing template data of presented stimuli. quantity: '*' - neurodata_type_inc: Images doc: Images objects containing images of presented stimuli. quantity: '*'
- Parameters:
children (List[
Group]) – Child groups
- handle_container_slot(cls: Group) BuildResult¶
Handle subgroups that contain arbitrarily numbered classes,
eg. each of the groups in
Examples
name: trials neurodata_type_inc: TimeIntervals doc: Repeated experimental events that have a logical grouping. quantity: ‘?’
name: invalid_times neurodata_type_inc: TimeIntervals doc: Time intervals that should be removed from analysis. quantity: ‘?’
neurodata_type_inc: TimeIntervals doc: Optional additional table(s) for describing other experimental time intervals. quantity: ‘*’
- build_subclasses() BuildResult¶
Build nested groups and datasets
Create ClassDefinitions for each, but then also create SlotDefinitions that will be used as attributes linking the main class to the subclasses
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'TYPE': FieldInfo(annotation=Type, required=False, default=<class 'nwb_schema_language.datamodel.nwb_schema_pydantic.Group'>), 'cls': FieldInfo(annotation=Group, required=True), 'parent': FieldInfo(annotation=Union[ClassAdapter, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.