{
  "$id": "https://schemas.dissco.tech/schemas/developer-schema/source-system/0.4.0/source-system-request.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$comment": "Source System Request Version 0.4.0",
  "title": "SourceSystemRequest",
  "type": "object",
  "properties": {
    "schema:name": {
      "type": "string",
      "description": "Name of the Source System as provided by the user",
      "examples": [
        "Herbarium of University of Coimbra (COI)"
      ]
    },
    "schema:description": {
      "type": "string",
      "description": "Description of the Source System as provided by the user",
      "examples": [
        "The herbarium collection of the University of Coimbra is one of the oldest in Portugal, with specimens dating back to the 18th century."
      ]
    },
    "schema:url": {
      "type": "string",
      "description": "Endpoint from which data may be retrieved",
      "format": "uri",
      "examples": [
        "http://ipt.gbif.pt/ipt/archive.do?r=coi"
      ]
    },
    "ods:filters": {
      "type": "array",
      "description": "List of filters to apply to ingesting from source system. How filters are implemented will vary per translator type.",
      "examples": [
        "<like path='/DataSets/DataSet/Metadata/Description/Representation/Title'>Herbarium Senckenbergianum (FR)</like>"
      ],
      "items": {
        "type": "string"
      }
    },
    "ltc:collectionManagementSystem": {
      "type": "string",
      "description": "The collection management system that the source system is using, https://rs.tdwg.org/ltc/terms/collectionManagementSystem",
      "examples": [
        "Specify 7"
      ]
    },
    "ods:maximumRecords": {
      "type": "integer",
      "minimum": 1,
      "description": "An optional parameter to limit the number of records to be ingested from this sourceSystem, it will pick the first X number of records it encounters. If left empty or absent it will process all records."
    },
    "ods:translatorType": {
      "description": "The serialisation of the data the endpoint provides indicating what type of Translator is required",
      "enum": [
        "dwca",
        "biocase"
      ]
    },
    "ods:dataMappingID": {
      "type": "string",
      "description": "The Handle of the Mapping Object needed for this Source System",
      "pattern": "^https:\/\/hdl\\.handle\\.net\/[\\w.]+\/(.){3}-(.){3}-(.){3}",
      "examples": [
        "https://hdl.handle.net/20.5000.1025/XXX-XXX-XXX"
      ]
    },
    "ods:specimenMachineAnnotationServices": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^https:\/\/hdl\\.handle\\.net\/[\\w.]+\/(.){3}-(.){3}-(.){3}"
      },
      "description": "Handles of machine annotation services that are triggered during the ingestion of this source system. These MASs target specimens in the source system",
      "examples": [
        [
          "https://hdl.handle.net/20.5000.1025/RB1-DRW-88Y",
          "https://hdl.handle.net/20.5000.1025/F28-90S-SQX"
        ]
      ]
    },
    "ods:mediaMachineAnnotationServices": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^https:\/\/hdl\\.handle\\.net\/[\\w.]+\/(.){3}-(.){3}-(.){3}"
      },
      "description": "Handles of machine annotation services that are triggered during the ingestion of this source system. These MASs target media in the source system",
      "examples": [
        [
          "https://hdl.handle.net/20.5000.1025/RB1-DRW-88Y",
          "https://hdl.handle.net/20.5000.1025/F28-90S-SQX"
        ]
      ]
    },
    "ods:hasTombstoneMetadata": {
      "type": "object",
      "description": "Object containing the tombstone metadata of the object. Only present when ods:status is ods:Tombstone",
      "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared-model/0.4.0/tombstone-metadata.json"
    }
  },
  "required": [
    "schema:name",
    "schema:url",
    "ods:translatorType",
    "ods:dataMappingID"
  ],
  "additionalProperties": false
}
