
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poseidat.org/schema/core/fishing-catch.json",
  "description": "Details of caught fish",
  "title": "Fishing catch",
  "properties": {
    "code": {
      "description": "The fish species code. NLD: SN, GBR: SN",
      "type": "string"
    },
    "weight": {
      "description": "Weight of fish in kg (see context) Depending on context this item will be either (1): Total weight of fish (in kilograms) in catch period. (2): Total weight of fish (in kilograms) on board (aggregate) or (3): Total weight of fish (in kilograms) landed (4): Total weight of fish discarded or used as a live bait. NLD: WT, GBR: WT",
      "type": "number"
    },
    "number_of_fish": {
      "description": "The number of fish. NLD: NF, GBR: NF",
      "type": "number"
    },
    "weight_in_nets": {
      "description": "Weight of fish kept in nets outside the hold. NLD: NQ, EU3: NQ ",
      "type": "number"
    },
    "number_of_fish_in_nets": {
      "description": "The number of fish held in nets outside the hold. NLD: NV, EU3: NB",
      "type": "number"
    },
    "landing_weight": {
      "description": "Estimate live weight, in kilograms, of fish to be landed or transshipped. If no catches being landed then 0 should be reported. NLD: WT, GBR: GBRLWT, EU3: WL",
      "type": "number"
    },
    "landing_number": {
      "description": "Total number of fish to be landed or transshipped. NLD: NF, GBR: LNF, EU3: FL",
      "type": "number"
    },
    "juvenile": {
      "description": "Indicates the catch is considered a juvenile. NLD3.3+: MV, GBR: GBRJUV",
      "type": "boolean",
      "default": false
    },
    "fish_farming": {
      "description": "Indicator for farmed fish (Dutch: kweekvis). NLD: KV",
      "type": "boolean",
      "default": false
    },
    "means_of_measuring": {
      "description": "Means of weight measuring: estimation (EST), weighing on board (WGH). EU3: MM",
      "type": "string",
      "enum": [
        "EST",
        "WGH"
      ]
    },
    "measured_weight": {
      "description": "The weighed or measured weight. Type depends on means_of_measuring value. NLD3.3: MM",
      "type": "string"
    },
    "fish_size": {
      "description": "Fish size category (1-8; one size or kg, g, cm, mm or number of fish per kg as appropriate). NLD3.3: SF",
      "type": "string"
    },
    "processed": {
      "description": "Details of the fish after processing. NL: NLPRO, GBR: PRO (also contains SPE)",
      "$ref": "https://poseidat.org/schema/core/fishing-catch-processed.json"
    }
  },
  "required": [
    "code"
  ],
  "oneOf": [{
      "required": [
        "weight"
      ]
    },
    {
      "required": [
        "number_of_fish"
      ]
    }
  ],
  "type": "object"
}
