<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1" elementFormDefault="qualified" targetNamespace="https://schema.ccmm.cz/research-data/1.1" xmlns:ccmm="https://schema.ccmm.cz/research-data/1.1" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" xmlns:xml="http://www.w3.org/XML/1998/namespace">
  <xs:include schemaLocation="../identifier/schema.xsd"/>
  <xs:include schemaLocation="../alternate-title/schema.xsd"/>
  <xs:include schemaLocation="../resource-to-agent-relationship/schema.xsd"/>
  <xs:include schemaLocation="../time-reference/schema.xsd"/>
  <xs:include schemaLocation="../resource-type/schema.xsd"/>
  <xs:include schemaLocation="../resource-relation-type/schema.xsd"/>
  <xs:complexType name="related_resource" sawsdl:modelReference="http://www.w3.org/2000/01/rdf-schema#Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Related resource - Resource represents any resource, physical or digital, that is related to the described dataset. 
        Class is used for description of the resource together with the type of relation, for which is used value from codelist https://vocabs.ccmm.cz/registry/codelist/RelationType/. Distributions of the datasets SHALL NOT be modeled as related resource, but as a distribution. Use qualified resource property to link to the dataset class. 
        Examples of resources: other related dataset, used methodology, instrument used for measurement, conference or conference paper etc...
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" name="iri" type="xs:anyURI"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="identifier" type="ccmm:identifier" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#hasIdentifier">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has identifier - has identifier
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="title" type="xs:string" sawsdl:modelReference="http://purl.org/dc/terms/title">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            title - A name given to the resource.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="alternate_title" type="ccmm:alternate_title" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#hasAlternateTitle">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has alternate title
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="resource_url" type="xs:anyURI" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#resourceUrl">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            resource URL - Human readable resolvable URL representing the resource.
            Resource URL represents human readable resolvable representation of the resource. Same url must be aslo in c:iri.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="qualified_relation" type="ccmm:resource_to_agent_relationship" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#qualifiedRelation">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            qualified relation
            Link to a description of a relationship between resource and an agent with the specification of the role of agent in this relationship.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="time_reference" type="ccmm:time_reference" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#hasTimeReference">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has time reference - Reference to events related to the resource.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="resource_type" type="ccmm:resource_type" sawsdl:modelReference="http://purl.org/dc/terms/type">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has resource type - The resource type of the resource.
            Use IRI identifier of a value from the register https://vocabularies.coar-repositories.org/resource_types/.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="resource_relation_type" type="ccmm:resource_relation_type" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#hasType">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has resource relation type - Relation to the relation type between dataset and resource.
            Use value from https://vocabs.ccmm.cz/registry/codelist/RelationType/.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="related_resource" type="ccmm:related_resource"/>
</xs:schema>
