{ "$schema": "http://json-schema.org/schema#", "$schemaVersion": "0.0.1", "$id": "https://smart-data-models.github.io/dataModel.Agrifood/Compartment/schema.json", "title": " Smart Data models - Compartment schema", "description": "Artificial area in a building or department that is measured by certain sensors. A compartment is not necessarily a physical separator. It can be a department or a grouping of several pens within a department that are being measured by the same sensor.", "type": "object", "allOf": [ { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" }, { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" }, { "$ref": "https://smart-data-models.github.io/dataModel.Agrifood/agrifood-schema.json#/definitions/AgriFood-Commons" }, { "properties": { "type": { "type": "string", "enum": [ "Compartment" ], "description": "Property. NGSI Entity type. it has to be Compartment" }, "additionalInfo": { "type": "array", "description": "Property. list of all the raw values sent by the sensor/platform with all the possible extra properties that are not included in the main structure. It is a JSON structure similar to this: { 'temperature': '32', 'humidity':'42'}", "items": { "type": "object", "properties": { "parameter": { "type": "string" }, "value": { "type": "string" } } } }, "arrivalTimestamp": { "type": "string", "description": "Property. Model:'https://schema.org/Datetime'. Date and Time at which the animal were inserted in the compartment", "format": "date-time" }, "avgGrowth": { "type": "number", "description": "Property. The average growth in weight of the animals in this compartment. Model:'https://schema.org/Number'." }, "avgWeight": { "type": "number", "minimum": 0, "description": "Property. The average weight of the pigs in this compartment. Model:'https://schema.org/Number'" }, "buildingId": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Unique identifier of a building the compartment is located in" }, "co2": { "type": "number", "minimum": 0, "description": "Property. The CO2 concentration in the compartment" }, "companyId": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Unique identifier of a company" }, "empty": { "type": "boolean", "description": "Property. True/False value if the compartment is empty" }, "farmId": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Unique identifier of a farm where the compartment is located in" }, "feedConsumption": { "type": "number", "minimum": 0, "description": "Property. The total amount of food that has been eaten from the feeding station(s) in the compartment" }, "humidity": { "type": "number", "minimum": 0, "maximum": 1, "description": "Property. Quantity representing the amount of water vapour in the atmosphere in the compartment. Model:'https://schema.org/Number'" }, "lastUpdate": { "type": "number", "description": "Property. Date and time at which the measurements in the compartment were taken. Unix timestamp" }, "luminosity": { "type": "number", "description": "Property. The brightness of a light source of a certain wavelength at the compartment. Model:'https://schema.org/Number'" }, "numAnimals": { "type": "number", "description": "Property. Number of animals in the compartment. Model:'https://schema.org/Number'" }, "parentCompartmentId": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Unique identifier of the compartment where this compartment is a part of. It is used only when a compartment contains other compartments" }, "sex": { "type": "string", "enum": [ "M", "F", "unknown", "" ], "description": "Property. The sex of the animals contained in the compartment" }, "temperature": { "type": "number", "description": "Property. Temperature of the compartment." }, "waterConsumption": { "type": "number", "minimum": 0, "description": "Property. The total amount of water that came out from the tap or taps in the compartment" }, "weightStDev": { "type": "number", "description": "Property. The standard deviation associated to the average weight of the pigs/piglets contained in the compartment" } } } ], "required": [ "id", "type", "lastUpdate" ] }