$schema: https://json-schema.org/draft/2020-12/schema
$id: https://example.com/gfw-gdansk-gulf-fishing-events.schema.yaml
title: Global Fishing Watch Gulf of Gdansk Fishing Events Response
description: Schema for a recent Global Fishing Watch Events API response filtered
  to apparent fishing events in the Gulf of Gdansk.
type: object
properties:
  metadata:
    type: object
    properties:
      datasets:
        type: array
        items:
          type: string
        x-jsonld-id: http://www.w3.org/ns/dcat#dataset
      dateRange:
        type: object
        properties:
          from:
            type: string
            format: date
            x-jsonld-id: http://www.w3.org/2006/time#hasBeginning
            x-jsonld-type: http://www.w3.org/2001/XMLSchema#date
          to:
            type: string
            format: date
            x-jsonld-id: http://www.w3.org/2006/time#hasEnd
            x-jsonld-type: http://www.w3.org/2001/XMLSchema#date
        required:
        - from
        - to
        x-jsonld-id: http://purl.org/dc/terms/temporal
      geometry:
        type: object
        properties:
          type:
            type: string
            x-jsonld-id: http://purl.org/dc/terms/type
          features:
            type: array
            items:
              type: object
              properties:
                type:
                  type: string
                  x-jsonld-id: http://purl.org/dc/terms/type
                geometry:
                  type: object
                  properties:
                    type:
                      type: string
                      x-jsonld-id: http://purl.org/dc/terms/type
                    coordinates:
                      type: array
                      x-jsonld-id: https://purl.org/geojson/vocab#coordinates
                  required:
                  - type
                  - coordinates
                  x-jsonld-id: http://www.w3.org/ns/locn#geometry
              required:
              - type
              - geometry
            x-jsonld-id: https://purl.org/geojson/vocab#features
        required:
        - type
        - features
        x-jsonld-id: http://www.w3.org/ns/locn#geometry
    required:
    - datasets
    - dateRange
    - geometry
    x-jsonld-id: https://globalfishingwatch.org/ontology/responseMetadata
  limit:
    type: integer
    x-jsonld-id: https://globalfishingwatch.org/ontology/limit
    x-jsonld-type: http://www.w3.org/2001/XMLSchema#integer
  offset:
    type: integer
    x-jsonld-id: https://globalfishingwatch.org/ontology/offset
    x-jsonld-type: http://www.w3.org/2001/XMLSchema#integer
  nextOffset:
    type: integer
    x-jsonld-id: https://globalfishingwatch.org/ontology/nextOffset
    x-jsonld-type: http://www.w3.org/2001/XMLSchema#integer
  total:
    type: integer
    x-jsonld-id: http://www.w3.org/ns/dcat#byteSize
    x-jsonld-type: http://www.w3.org/2001/XMLSchema#integer
  entries:
    type: array
    items:
      type: object
      properties:
        start:
          type: string
          format: date-time
          x-jsonld-id: https://schema.org/startDate
          x-jsonld-type: http://www.w3.org/2001/XMLSchema#dateTime
        end:
          type: string
          format: date-time
          x-jsonld-id: https://schema.org/endDate
          x-jsonld-type: http://www.w3.org/2001/XMLSchema#dateTime
        id:
          type: string
          x-jsonld-id: https://schema.org/identifier
        type:
          type: string
          x-jsonld-id: http://purl.org/dc/terms/type
        position:
          type: object
          properties:
            lat:
              type: number
              x-jsonld-id: http://www.w3.org/2003/01/geo/wgs84_pos#lat
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            lon:
              type: number
              x-jsonld-id: http://www.w3.org/2003/01/geo/wgs84_pos#long
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
          required:
          - lat
          - lon
          x-jsonld-id: http://www.w3.org/2003/01/geo/wgs84_pos#location
        regions:
          type: object
          properties:
            mpa:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/marineProtectedArea
            eez:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/exclusiveEconomicZone
            rfmo:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/regionalFisheriesManagementOrganization
            fao:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/faoArea
            majorFao:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/majorFaoArea
            eez12Nm:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/territorialSea
            highSeas:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/highSeas
            mpaNoTakePartial:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/marineProtectedAreaNoTakePartial
            mpaNoTake:
              type: array
              items:
                type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/marineProtectedAreaNoTake
          required:
          - mpa
          - eez
          - rfmo
          - fao
          - majorFao
          - eez12Nm
          - highSeas
          - mpaNoTakePartial
          - mpaNoTake
          x-jsonld-id: http://purl.org/dc/terms/spatial
        boundingBox:
          type: array
          items:
            type: number
          minItems: 4
          maxItems: 4
          x-jsonld-id: http://purl.org/dc/terms/spatial
        distances:
          type: object
          properties:
            startDistanceFromShoreKm:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/startDistanceFromShoreKm
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            endDistanceFromShoreKm:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/endDistanceFromShoreKm
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            startDistanceFromPortKm:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/startDistanceFromPortKm
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            endDistanceFromPortKm:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/endDistanceFromPortKm
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
          required:
          - startDistanceFromShoreKm
          - endDistanceFromShoreKm
          - startDistanceFromPortKm
          - endDistanceFromPortKm
          x-jsonld-id: https://globalfishingwatch.org/ontology/distanceMetrics
        vessel:
          type: object
          properties:
            id:
              type: string
              x-jsonld-id: https://schema.org/identifier
            name:
              type: string
              x-jsonld-id: https://schema.org/name
            ssvid:
              type: string
              x-jsonld-id: https://schema.org/identifier
            flag:
              type: string
              x-jsonld-id: https://schema.org/countryOfOrigin
            type:
              type: string
              x-jsonld-id: http://purl.org/dc/terms/type
            publicAuthorizations:
              type: array
              items:
                type: object
                properties:
                  hasPubliclyListedAuthorization:
                    type: string
                    x-jsonld-id: https://globalfishingwatch.org/ontology/hasPubliclyListedAuthorization
                  rfmo:
                    type: string
                    x-jsonld-id: https://globalfishingwatch.org/ontology/regionalFisheriesManagementOrganization
                required:
                - hasPubliclyListedAuthorization
                - rfmo
              x-jsonld-id: https://globalfishingwatch.org/ontology/publicAuthorization
            nextPort:
              type:
              - 'null'
              - string
              x-jsonld-id: https://schema.org/arrivalStation
          required:
          - id
          - name
          - ssvid
          - flag
          - type
          - publicAuthorizations
          - nextPort
          x-jsonld-id: https://schema.org/vehicle
        fishing:
          type: object
          properties:
            totalDistanceKm:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/totalDistanceKm
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            averageSpeedKnots:
              type: number
              x-jsonld-id: https://globalfishingwatch.org/ontology/averageSpeedKnots
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            averageDurationHours:
              type:
              - 'null'
              - number
              x-jsonld-id: https://globalfishingwatch.org/ontology/averageDurationHours
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#double
            potentialRisk:
              type: boolean
              x-jsonld-id: https://globalfishingwatch.org/ontology/potentialRisk
              x-jsonld-type: http://www.w3.org/2001/XMLSchema#boolean
            vesselPublicAuthorizationStatus:
              type: string
              x-jsonld-id: https://globalfishingwatch.org/ontology/vesselPublicAuthorizationStatus
          required:
          - totalDistanceKm
          - averageSpeedKnots
          - averageDurationHours
          - potentialRisk
          - vesselPublicAuthorizationStatus
          x-jsonld-id: https://globalfishingwatch.org/ontology/fishingMetrics
      required:
      - start
      - end
      - id
      - type
      - position
      - regions
      - boundingBox
      - distances
      - vessel
      - fishing
    x-jsonld-id: http://www.w3.org/ns/dcat#distribution
required:
- metadata
- limit
- offset
- nextOffset
- total
- entries
x-jsonld-extra-terms:
  Dataset: http://www.w3.org/ns/dcat#Dataset
x-jsonld-base: 'urn:gfw:gdansk-gulf:fishing-events:'
x-jsonld-prefixes:
  dcat: http://www.w3.org/ns/dcat#
  gfw: https://globalfishingwatch.org/ontology/
  dcterms: http://purl.org/dc/terms/
  time: http://www.w3.org/2006/time#
  xsd: http://www.w3.org/2001/XMLSchema#
  locn: http://www.w3.org/ns/locn#
  geojson: https://purl.org/geojson/vocab#
  schema: https://schema.org/
  geo: http://www.w3.org/2003/01/geo/wgs84_pos#
  prov: http://www.w3.org/ns/prov#
