{
  "$id": "https://schemas.opendd.eu/xtdsubject.1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "xtd Subject Schema",
  "description": "xtdSubject is a specialization of xtdConcept.; It contains a list of properties that can be associated to filters with other subjects. An xtdSubject can be physical or logical.; According to SS-EN ISO 12006-3:2022.; Abstract entity.",
  "type": "object",
  "allOf": [
    {
      "$ref": "/xtdroot.1.schema.json"
    },
    {
      "$ref": "/opendd-entity-meta.1.schema.json"
    },
    {
      "$ref": "/xtdobject.1.schema.json"
    },
    {
      "$ref": "/xtdconcept.1.schema.json"
    },
    {
      "$ref": "#/$defs/Subject"
    }
  ],
  "$defs": {
    "Subject": {
      "type": "object",
      "properties": {
        "Properties": {
          "title": "Properties",
          "description": "List of the properties attached to the subject.",
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "/xtdproperty.1.schema.json"
              },
              {
                "$ref": "/opendd-entityref.1.schema.json"
              }
            ]
          },
          "minItems": 1
        },
        "ConnectedSubjects": {
          "title": "Connected subjects",
          "description": "List of subjects connected with a qualified relationship.",
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "/xtdrelationshiptosubject.1.schema.json"
              },
              {
                "$ref": "/opendd-entityref.1.schema.json"
              }
            ]
          },
          "minItems": 1
        },
        "Filters": {
          "title": "Filters",
          "description": "List of filters used for mapping or automatic classification purpose.",
          "type": "array",
          "items": {
            "$ref": "/opendd-entityref.1.schema.json"
          }
        },
        "InstanceOf": {
          "type": "string",
          "const": "https://schemas.opendd.eu/xtdsubject.1.schema.json"
        }
      }
    }
  },
  "unevaluatedProperties": false
}
