{
    "$defs": {
        "Attribute": {
            "additionalProperties": false,
            "description": "A domain, measurement, attribute, property, or any descriptor for additional properties.  Where available, please use OBO Foundry ontologies or other controlled vocabularies for attributes.",
            "properties": {
                "id": {
                    "description": "A unique identifier.",
                    "type": "string"
                },
                "label": {
                    "description": "Text string to describe the attribute.",
                    "type": "string"
                }
            },
            "required": [
                "id",
                "label"
            ],
            "title": "Attribute",
            "type": "object"
        },
        "Dataset": {
            "additionalProperties": false,
            "description": "A collection of samples representing a coherent data delivery or analytical campaign.",
            "properties": {
                "description": {
                    "description": "A free-text description.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "id": {
                    "description": "A unique identifier.",
                    "type": "string"
                },
                "name": {
                    "description": "A human-readable name.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "samples": {
                    "description": "The samples included in this dataset.",
                    "items": {
                        "$ref": "#/$defs/Sample"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "variables": {
                    "description": "Variable definitions used by measurements in this dataset.",
                    "items": {
                        "$ref": "#/$defs/Variable"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                }
            },
            "required": [
                "id"
            ],
            "title": "Dataset",
            "type": "object"
        },
        "Measurement": {
            "additionalProperties": false,
            "description": "A single measured value for a variable on a sample, with full provenance including method, QC flags, timestamps, and aggregation metadata.  Extends bertron QuantityValue with measurement-specific context.",
            "properties": {
                "attribute": {
                    "description": "The variable being measured, as a reference to a Variable definition.",
                    "type": "string"
                },
                "datetime_measured": {
                    "description": "Date and time when the measurement was taken.",
                    "format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "flag": {
                    "description": "Quality assurance flag associated with the measurement.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "method_id": {
                    "description": "Identifier for the analytical method used to produce the measurement.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "notes": {
                    "description": "Free-text notes about the measurement.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "numeric_value": {
                    "description": "The numerical part of a quantity value.",
                    "type": "number"
                },
                "raw_value": {
                    "description": "The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "reported_precision": {
                    "description": "The precision of the reported result value.",
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "statistic": {
                    "description": "The summary statistic applied to the measurement, if any (e.g. mean, median).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "temporal_aggregation": {
                    "description": "The time interval over which the statistic was aggregated (e.g. daily, 15-min).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "unit": {
                    "description": "Unit of measurement, ideally as a Unit Ontology CURIE.",
                    "type": "string"
                },
                "unit_cv_id": {
                    "description": "The unit of the quantity, expressed as a CURIE from the Unit Ontology.",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "numeric_value",
                "unit",
                "attribute"
            ],
            "title": "Measurement",
            "type": "object"
        },
        "QuantityValue": {
            "additionalProperties": false,
            "description": "A simple quantity, e.g. 2cm.",
            "properties": {
                "attribute": {
                    "description": "The attribute being represented.",
                    "type": "string"
                },
                "numeric_value": {
                    "description": "The numerical part of a quantity value.",
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "raw_value": {
                    "description": "The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "unit": {
                    "description": "Unit of measurement, ideally as a Unit Ontology CURIE.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "unit_cv_id": {
                    "description": "The unit of the quantity, expressed as a CURIE from the Unit Ontology.",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "attribute"
            ],
            "title": "QuantityValue",
            "type": "object"
        },
        "Sample": {
            "additionalProperties": false,
            "description": "A physical sample collected for analysis, identified by site, medium, and replicate.",
            "properties": {
                "id": {
                    "description": "A unique identifier.",
                    "type": "string"
                },
                "measurements": {
                    "description": "The measurements performed on this sample.",
                    "items": {
                        "$ref": "#/$defs/Measurement"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "medium": {
                    "description": "The environmental medium or matrix sampled (e.g. OCN for ocean water).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "name": {
                    "description": "A human-readable name.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "replicate": {
                    "description": "Replicate number within a site and medium.",
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "site_code": {
                    "description": "Code identifying the sampling site (e.g. CM_003, CM_004).",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "id"
            ],
            "title": "Sample",
            "type": "object"
        },
        "TextValue": {
            "additionalProperties": false,
            "description": "A quality, described using a text string.",
            "properties": {
                "attribute": {
                    "description": "The attribute being represented.",
                    "type": "string"
                },
                "raw_value": {
                    "description": "The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "value": {
                    "description": "The value, as a text string.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "value_cv_id": {
                    "description": "For values that are in a controlled vocabulary (CV), this attribute should capture the controlled vocabulary ID for the value.",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "required": [
                "attribute"
            ],
            "title": "TextValue",
            "type": "object"
        },
        "Variable": {
            "additionalProperties": false,
            "description": "Semantic definition of a measured environmental variable. Extends bertron Attribute with structured variable metadata (expression basis).  Defined once per variable and referenced by Measurements.",
            "properties": {
                "default_unit": {
                    "description": "Default unit for this variable, ideally as a Unit Ontology CURIE.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "expression_basis": {
                    "description": "The chemical expression basis (e.g. as dissolved carbon).",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "id": {
                    "description": "Canonical identifier for this variable (e.g. carbon_dissolved_organic).",
                    "type": "string"
                },
                "label": {
                    "description": "Text string to describe the attribute.",
                    "type": "string"
                },
                "missing_value_code": {
                    "description": "The sentinel value used to represent missing data for this variable.",
                    "type": [
                        "integer",
                        "null"
                    ]
                }
            },
            "required": [
                "id",
                "label"
            ],
            "title": "Variable",
            "type": "object"
        }
    },
    "$id": "https://w3id.org/sierra-moxon/wss-test",
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "additionalProperties": true,
    "description": "A collection of samples representing a coherent data delivery or analytical campaign.",
    "metamodel_version": "1.7.0",
    "properties": {
        "description": {
            "description": "A free-text description.",
            "type": [
                "string",
                "null"
            ]
        },
        "id": {
            "description": "A unique identifier.",
            "type": "string"
        },
        "name": {
            "description": "A human-readable name.",
            "type": [
                "string",
                "null"
            ]
        },
        "samples": {
            "description": "The samples included in this dataset.",
            "items": {
                "$ref": "#/$defs/Sample"
            },
            "type": [
                "array",
                "null"
            ]
        },
        "variables": {
            "description": "Variable definitions used by measurements in this dataset.",
            "items": {
                "$ref": "#/$defs/Variable"
            },
            "type": [
                "array",
                "null"
            ]
        }
    },
    "required": [
        "id"
    ],
    "title": "wss-test",
    "type": "object",
    "version": null
}
