{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publicschema.org/agri/Farm.schema.json",
  "title": "Farm",
  "description": "An economic unit of agricultural production under single management. It comprises all livestock kept and all land used wholly or partly for agricultural production, whatever the title, legal form or size. Its land may lie in one or more separate areas that share the same means of production. A farm may have no land, for example when it only keeps livestock. It is identified separately from the household, from the persons, organizations or groups responsible for it, and from the rights over its land. Summary fields such as the farm's area, land tenure types and livestock kept do not override detailed parcel, tenure or animal records.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The full display name of the record. Depending on the concept, this is a person's or group's name, or the title of a program, instrument, scoring rule, or software product."
    },
    "identifiers": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "https://publicschema.org/Identifier.schema.json"
          },
          {
            "type": "string",
            "description": "URI or identifier reference"
          }
        ],
        "description": "Identifiers carried by this entity, such as national ID numbers, program IDs, or identifiers asserted by an identity document."
      }
    },
    "farm_area": {
      "$ref": "https://publicschema.org/QuantityValue.schema.json",
      "description": "The total area of land operated by the farm, whatever the title, as declared or measured by the source, with its unit of measure. It is zero for a farm without land. It is not the sum of the areas of parcels shared with other farms."
    },
    "livestock_type": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "cattle",
          "buffaloes",
          "sheep",
          "goats",
          "pigs",
          "chickens",
          "other_poultry",
          "horses",
          "donkeys_mules",
          "camels",
          "llamas_alpacas",
          "rabbits",
          "bees",
          "other_livestock"
        ],
        "$comment": "https://publicschema.org/vocab/agri/livestock-type",
        "description": "The kinds of livestock kept on the farm, whether or not the farm owns them."
      }
    },
    "land_tenure": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "owned_with_title",
          "owned_without_title",
          "rented",
          "sharecropped",
          "communal",
          "state_allocated",
          "informal",
          "borrowed",
          "other"
        ],
        "$comment": "https://publicschema.org/vocab/agri/land-tenure",
        "description": "The kinds of arrangement under which the farm operates its land, such as ownership, rental, sharecropping or use of common land. A farm may operate land under several arrangements. This describes how the farm uses land; it is not a record of land rights."
      }
    },
    "location": {
      "oneOf": [
        {
          "$ref": "https://publicschema.org/Location.schema.json"
        },
        {
          "type": "string",
          "description": "URI or identifier reference"
        }
      ],
      "description": "The geographic location of the subject of this record, captured as coordinates or administrative area."
    }
  }
}
