|
1 | 1 | # Auto generated from oae_data_protocol.yaml by pythongen.py version: 0.0.1 |
2 | | -# Generation date: 2026-03-29T13:58:46 |
| 2 | +# Generation date: 2026-03-30T19:45:07 |
3 | 3 | # Schema: OAEDataManagementProtocol |
4 | 4 | # |
5 | 5 | # id: OAEDataManagementProtocol |
@@ -582,7 +582,7 @@ class Experiment(YAMLRoot): |
582 | 582 | spatial_coverage: Union[dict, SpatialCoverage] = None |
583 | 583 | project_id: str = None |
584 | 584 | experiment_id: str = None |
585 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 585 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
586 | 586 | experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None |
587 | 587 | start_datetime: Union[str, XSDDateTime] = None |
588 | 588 | name: Optional[str] = None |
@@ -610,11 +610,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): |
610 | 610 | if not isinstance(self.experiment_id, str): |
611 | 611 | self.experiment_id = str(self.experiment_id) |
612 | 612 |
|
613 | | - if self._is_empty(self.experiment_type): |
614 | | - self.MissingRequiredField("experiment_type") |
615 | | - if not isinstance(self.experiment_type, list): |
616 | | - self.experiment_type = [self.experiment_type] if self.experiment_type is not None else [] |
617 | | - self.experiment_type = [v if isinstance(v, ExperimentType) else ExperimentType(v) for v in self.experiment_type] |
| 613 | + if self._is_empty(self.experiment_types): |
| 614 | + self.MissingRequiredField("experiment_types") |
| 615 | + if not isinstance(self.experiment_types, list): |
| 616 | + self.experiment_types = [self.experiment_types] if self.experiment_types is not None else [] |
| 617 | + self.experiment_types = [v if isinstance(v, ExperimentType) else ExperimentType(v) for v in self.experiment_types] |
618 | 618 |
|
619 | 619 | if self._is_empty(self.experiment_leads): |
620 | 620 | self.MissingRequiredField("experiment_leads") |
@@ -656,7 +656,7 @@ class InSituExperiment(Experiment): |
656 | 656 | spatial_coverage: Union[dict, SpatialCoverage] = None |
657 | 657 | project_id: str = None |
658 | 658 | experiment_id: str = None |
659 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 659 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
660 | 660 | experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None |
661 | 661 | start_datetime: Union[str, XSDDateTime] = None |
662 | 662 | vertical_coverage: Optional[Union[dict, VerticalExtent]] = None |
@@ -703,7 +703,7 @@ class Intervention(InSituExperiment): |
703 | 703 | spatial_coverage: Union[dict, SpatialCoverage] = None |
704 | 704 | project_id: str = None |
705 | 705 | experiment_id: str = None |
706 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 706 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
707 | 707 | experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None |
708 | 708 | start_datetime: Union[str, XSDDateTime] = None |
709 | 709 | alkalinity_feedstock_processing: Union[str, "AlkalinityFeedstockProcessing"] = None |
@@ -813,7 +813,7 @@ class Tracer(InSituExperiment): |
813 | 813 | spatial_coverage: Union[dict, SpatialCoverage] = None |
814 | 814 | project_id: str = None |
815 | 815 | experiment_id: str = None |
816 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 816 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
817 | 817 | experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None |
818 | 818 | start_datetime: Union[str, XSDDateTime] = None |
819 | 819 | tracer_form: Union[str, "TracerForm"] = None |
@@ -896,7 +896,7 @@ class InterventionWithTracer(Intervention): |
896 | 896 | spatial_coverage: Union[dict, SpatialCoverage] = None |
897 | 897 | project_id: str = None |
898 | 898 | experiment_id: str = None |
899 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 899 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
900 | 900 | experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None |
901 | 901 | start_datetime: Union[str, XSDDateTime] = None |
902 | 902 | alkalinity_feedstock_processing: Union[str, "AlkalinityFeedstockProcessing"] = None |
@@ -2605,7 +2605,7 @@ class Model(Experiment): |
2605 | 2605 | spatial_coverage: Union[dict, SpatialCoverage] = None |
2606 | 2606 | project_id: str = None |
2607 | 2607 | experiment_id: str = None |
2608 | | - experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
| 2608 | + experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None |
2609 | 2609 | experiment_leads: Union[Union[dict, Person], List[Union[dict, Person]]] = None |
2610 | 2610 | start_datetime: Union[str, XSDDateTime] = None |
2611 | 2611 | model_configuration: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() |
@@ -4785,8 +4785,8 @@ class slots: |
4785 | 4785 | slots.permit__approval_document = Slot(uri=OAE.approval_document, name="permit__approval_document", curie=OAE.curie('approval_document'), |
4786 | 4786 | model_uri=OAE.permit__approval_document, domain=None, range=str) |
4787 | 4787 |
|
4788 | | -slots.experiment__experiment_type = Slot(uri=OAE.experiment_type, name="experiment__experiment_type", curie=OAE.curie('experiment_type'), |
4789 | | - model_uri=OAE.experiment__experiment_type, domain=None, range=Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]]) |
| 4788 | +slots.experiment__experiment_types = Slot(uri=OAE.experiment_types, name="experiment__experiment_types", curie=OAE.curie('experiment_types'), |
| 4789 | + model_uri=OAE.experiment__experiment_types, domain=None, range=Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]]) |
4790 | 4790 |
|
4791 | 4791 | slots.experiment__public_comments = Slot(uri=OAE.public_comments, name="experiment__public_comments", curie=OAE.curie('public_comments'), |
4792 | 4792 | model_uri=OAE.experiment__public_comments, domain=None, range=Optional[str]) |
|
0 commit comments