{
  "$id": "https://schemas.dissco.tech/schemas/fdo-type/annotation/0.4.0/annotation-processing-request.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$comment": "Annotation Version 0.4.0",
  "title": "Annotation",
  "description": "Annotation sent to the processing service from DiSSCover or a MAS",
  "type": "object",
  "properties": {
    "@id": {
      "type": "string",
      "description": "The unique identifier (handle) of the Annotation object",
      "pattern": "^https:\/\/hdl\\.handle\\.net\/[\\w.]+\/(.){3}-(.){3}-(.){3}",
      "examples": [
        "https://hdl.handle.net/20.5000.1025/XXX-XXX-XXX"
      ]
    },
    "@type": {
      "type": "string",
      "description": "The type of the object, in this case ods:Annotation",
      "const": "ods:Annotation"
    },
    "dcterms:identifier": {
      "type": "string",
      "description": "The handle of the annotation. It is a unique identifier for the annotation. It is composed of the handle of the document followed by a slash and a unique identifier for the annotation.",
      "pattern": "^https:\/\/hdl\\.handle\\.net\/[\\w.]+\/(.){3}-(.){3}-(.){3}",
      "examples": [
        "https://hdl.handle.net/20.5000.1025/XXX-XXX-XXX"
      ]
    },
    "oa:motivation": {
      "description": "The motivation for the annotation. Based on a selection of https://www.w3.org/TR/annotation-model/#motivation-and-purpose. The motivation ods:adding is added for DiSSCo's purposes.",
      "enum": [
        "ods:adding",
        "ods:deleting",
        "oa:assessing",
        "oa:editing",
        "oa:commenting"
      ]
    },
    "oa:motivatedBy": {
      "type": "string",
      "description": "Describes the reason for the annotation.",
      "examples": [
        "The country is incorrect",
        "Identified a new link to a record in ENA"
      ]
    },
    "oa:hasTarget": {
      "type": "object",
      "description": "Indicates the particular object and part of the object on which the annotation has been made.",
      "$ref": "https://schemas.dissco.tech/schemas/fdo-type/annotation/0.4.0/annotation-target.json"
    },
    "oa:hasBody": {
      "type": "object",
      "description": "The body of the annotation contains the specific value of the annotation",
      "$ref": "https://schemas.dissco.tech/schemas/fdo-type/annotation/0.4.0/annotation-body.json"
    },
    "dcterms:creator": {
      "type": "object",
      "description": "Contains information about the creator of the annotation",
      "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared-model/0.4.0/agent.json"
    },
    "dcterms:created": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the annotation was created. https://purl.org/dc/terms/created"
    },
    "ods:placeInBatch": {
      "type": "integer",
      "description": "The place of the annotation in the batch"
    },
    "ods:batchID": {
      "type": "string",
      "format": "uuid",
      "description": "Internally generated PID to identify the batch the annotation was generated by"
    },
    "ods:mergingDecisionStatus": {
      "type": "string",
      "enum": [
        "Pending",
        "Rejected",
        "Approved"
      ],
      "description": "The merging status of the annotation. Only present when motivation is ods:adding, oa:editing, or ods:deleting"
    },
    "ods:mergingStateChangeDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the annotation was merging state was changed. Only present when motivation is ods:adding or oa:editing. Following the ISO Date Time Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
    },
    "ods:hasMergingStateChangedBy": {
      "type": "object",
      "description": "Object containing information on who changed the merging state of the annotation. Only present when motivation is ods:adding or oa:editing. Contains an ods:Agent object.",
      "$ref": "https://schemas.dissco.tech/schemas/fdo-type/shared-model/0.4.0/agent.json"
    }
  },
  "required": [
    "oa:motivation",
    "oa:hasTarget",
    "dcterms:creator",
    "dcterms:created"
  ],
  "additionalProperties": false
}
