{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolDataServiceBase",
	"title": "DataspaceProtocolDataServiceBase",
	"description": "Base data service interface compliant with Eclipse Data Space Protocol, requiring an id and endpointURL.",
	"type": "object",
	"properties": {
		"@type": {
			"const": "DataService",
			"description": "The type identifier for the Data Service.\nREQUIRED per Eclipse Data Space Protocol."
		},
		"@id": {
			"type": "string",
			"description": "Unique identifier for the dataset.\nREQUIRED per Eclipse Data Space Protocol."
		},
		"endpointURL": {
			"type": "string",
			"description": "Endpoint URL."
		},
		"servesDataset": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolDatasetBase"
			},
			"description": "Datasets served.",
			"minItems": 1
		}
	},
	"required": ["@type", "@id", "endpointURL"],
	"allOf": [
		{
			"description": "Base interface for DCAT Data Service without JSON-LD context.\nThis is the context-free variant of IDcatDataService, intended for embedding\ndata service objects inline within other objects where the context is provided by the enclosing document.",
			"type": "object",
			"properties": {
				"@id": {
					"type": "string",
					"description": "The unique identifier for the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:title": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A name given to the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:description": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A free-text account of the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:identifier": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A unique identifier of the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:issued": {
					"type": "string",
					"description": "Date of formal issuance (publication) of the resource.",
					"format": "date-time",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:modified": {
					"type": "string",
					"description": "Most recent date on which the resource was changed, updated or modified.",
					"format": "date-time",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:language": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A language of the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:publisher": {
					"anyOf": [
						{
							"description": "A FOAF Agent.",
							"type": "object",
							"properties": {
								"@context": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafContextType",
									"description": "The LD Context.",
									"$comment": "Inherited from FoafAgent"
								},
								"@id": {
									"type": "string",
									"description": "The unique identifier for the FOAF object.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:name": {
									"type": "string",
									"description": "A name for some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:title": {
									"type": "string",
									"description": "Title (Mr, Mrs, Ms, Dr. etc)",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:mbox": {
									"type": "string",
									"description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:homepage": {
									"type": "string",
									"description": "A homepage for some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:depiction": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafImage",
									"description": "A depiction of some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"@type": {
									"anyOf": [
										{
											"const": "Agent"
										},
										{
											"const": "Person"
										},
										{
											"const": "Organization"
										},
										{
											"const": "Group"
										},
										{
											"type": "string"
										}
									],
									"description": "Type.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:age": {
									"type": "number",
									"description": "The age in years of some agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:made": {
									"anyOf": [
										{
											"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
										},
										{
											"type": "array",
											"items": {
												"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
											}
										}
									],
									"description": "Something that was made by this agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:weblog": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "A weblog of some thing (whether person, group, company etc.).",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:openid": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "An OpenID for an agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:interest": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "A page about a topic of interest to this person.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:topic_interest": {
									"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
									"description": "A thing of interest to this person.",
									"$comment": "Inherited from FoafAgent"
								}
							},
							"required": ["@type"],
							"$comment": "Inlined utility base type FoafAgent so utility transformations can operate on concrete properties instead of a $ref."
						},
						{
							"type": "string"
						}
					],
					"description": "An entity responsible for making the resource available.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:creator": {
					"anyOf": [
						{
							"description": "A FOAF Agent.",
							"type": "object",
							"properties": {
								"@context": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafContextType",
									"description": "The LD Context.",
									"$comment": "Inherited from FoafAgent"
								},
								"@id": {
									"type": "string",
									"description": "The unique identifier for the FOAF object.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:name": {
									"type": "string",
									"description": "A name for some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:title": {
									"type": "string",
									"description": "Title (Mr, Mrs, Ms, Dr. etc)",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:mbox": {
									"type": "string",
									"description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:homepage": {
									"type": "string",
									"description": "A homepage for some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"foaf:depiction": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafImage",
									"description": "A depiction of some thing.",
									"$comment": "Inherited from FoafBaseObject"
								},
								"@type": {
									"anyOf": [
										{
											"const": "Agent"
										},
										{
											"const": "Person"
										},
										{
											"const": "Organization"
										},
										{
											"const": "Group"
										},
										{
											"type": "string"
										}
									],
									"description": "Type.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:age": {
									"type": "number",
									"description": "The age in years of some agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:made": {
									"anyOf": [
										{
											"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
										},
										{
											"type": "array",
											"items": {
												"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
											}
										}
									],
									"description": "Something that was made by this agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:weblog": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "A weblog of some thing (whether person, group, company etc.).",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:openid": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "An OpenID for an agent.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:interest": {
									"$ref": "https://schema.twindev.org/dataspace-protocol/FoafDocument",
									"description": "A page about a topic of interest to this person.",
									"$comment": "Inherited from FoafAgent"
								},
								"foaf:topic_interest": {
									"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
									"description": "A thing of interest to this person.",
									"$comment": "Inherited from FoafAgent"
								}
							},
							"required": ["@type"],
							"$comment": "Inlined utility base type FoafAgent so utility transformations can operate on concrete properties instead of a $ref."
						},
						{
							"type": "string"
						}
					],
					"description": "An entity responsible for producing the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:accessRights": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "string"
						}
					],
					"description": "Information about who can access the resource or an indication of its security status.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:license": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "string"
						}
					],
					"description": "A legal document under which the resource is made available.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:rights": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "string"
						}
					],
					"description": "Information about rights held in and over the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:conformsTo": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "An established standard to which the resource conforms.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcterms:type": {
					"type": "string",
					"description": "The nature or genre of the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcat:contactPoint": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
						},
						{
							"type": "string"
						}
					],
					"description": "Relevant contact information for the catalogued resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcat:keyword": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A keyword or tag describing the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcat:theme": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A main category of the resource. A resource can have multiple themes.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcat:landingPage": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "A Web page that can be navigated to gain access to the resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"dcat:qualifiedRelation": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/dataspace-protocol/DcatRelationship"
						},
						{
							"type": "string"
						}
					],
					"description": "Link to a description of a relationship with another resource.",
					"$comment": "Inherited from DcatResourceBase"
				},
				"odrl:hasPolicy": {
					"description": "An ODRL conformant policy expressing the rights associated with the resource.",
					"type": "object",
					"properties": {
						"@type": {
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicyType",
							"description": "The type of policy.\nMust be one of: \"Set\", \"Offer\", \"Agreement\""
						},
						"uid": {
							"type": "string",
							"description": "The unique identifier for the policy.\nMust be an IRI.",
							"format": "uri"
						},
						"profile": {
							"anyOf": [
								{
									"type": "string"
								},
								{
									"type": "array",
									"items": {
										"type": "string"
									}
								}
							],
							"description": "The profile(s) this policy conforms to.\nIRIs identifying the ODRL Profile(s)."
						},
						"assigner": {
							"anyOf": [
								{
									"type": "string"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
								},
								{
									"type": "array",
									"items": {
										"anyOf": [
											{
												"type": "string"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
											}
										]
									}
								}
							],
							"description": "The assigner of the policy.\nApplies to all rules unless overridden at rule level."
						},
						"assignee": {
							"anyOf": [
								{
									"type": "string"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
								},
								{
									"type": "array",
									"items": {
										"anyOf": [
											{
												"type": "string"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
											}
										]
									}
								}
							],
							"description": "The assignee of the policy.\nApplies to all rules unless overridden at rule level."
						},
						"target": {
							"anyOf": [
								{
									"type": "string"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
								},
								{
									"type": "array",
									"items": {
										"anyOf": [
											{
												"type": "string"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
											}
										]
									}
								}
							],
							"description": "The target asset for the rule."
						},
						"action": {
							"anyOf": [
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlActionType"
								},
								{
									"type": "string"
								},
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
								},
								{
									"type": "array",
									"items": {
										"anyOf": [
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlActionType"
											},
											{
												"type": "string"
											},
											{
												"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
											}
										]
									}
								}
							],
							"description": "The action associated with the rule."
						},
						"inheritFrom": {
							"anyOf": [
								{
									"type": "string"
								},
								{
									"type": "array",
									"items": {
										"type": "string"
									}
								}
							],
							"description": "The parent policy(ies) this policy inherits from.\nIRIs identifying the parent Policy(ies)."
						},
						"conflict": {
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConflictStrategyType",
							"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
						},
						"permission": {
							"anyOf": [
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
								},
								{
									"type": "array",
									"items": {
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
									}
								}
							],
							"description": "The permissions in the policy.\nAt least one of permission, prohibition, or obligation must be present."
						},
						"prohibition": {
							"anyOf": [
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
								},
								{
									"type": "array",
									"items": {
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
									}
								}
							],
							"description": "The prohibitions in the policy.\nAt least one of permission, prohibition, or obligation must be present."
						},
						"obligation": {
							"anyOf": [
								{
									"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
								},
								{
									"type": "array",
									"items": {
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
									}
								}
							],
							"description": "The obligations in the policy.\nAt least one of permission, prohibition, or obligation must be present."
						},
						"@context": {
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlContextType",
							"description": "The context for the policy.\nMust include \"https://www.w3.org/ns/odrl.jsonld\""
						}
					},
					"required": ["@type", "uid"],
					"$comment": "Inlined utility base type OdrlPolicy so utility transformations can operate on concrete properties instead of a $ref."
				},
				"dcat:endpointDescription": {
					"type": "string",
					"description": "A description of the services available via the end-points, including their\noperations, parameters, etc.",
					"$comment": "Inherited from DcatDataServiceBase"
				}
			},
			"$comment": "Inlined utility base type DcatDataServiceBase so utility transformations can operate on concrete properties instead of a $ref."
		}
	]
}
