<?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.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:ccmm="https://schema.ccmm.cz/research-data/1.0" xmlns:sawsdl="http://www.w3.org/ns/sawsdl">
  <xs:include schemaLocation="../resource-to-agent-relationship/schema.xsd"/>
  <xs:include schemaLocation="../time_reference/schema.xsd"/>
  <xs:include schemaLocation="../identifier/schema.xsd"/>
  <xs:include schemaLocation="../resource-type/schema.xsd"/>
  <xs:include schemaLocation="../resource-relation-type/schema.xsd"/>
  <xs:complexType name="resource" sawsdl:modelReference="http://www.w3.org/2000/01/rdf-schema#Resource">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Resource - Resource represents any resource, physical or digital, that is related to the described dataset. 
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" name="iri" type="xs:anyURI"/>
      <xs:element minOccurs="0" name="title" type="xs:string" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/datacite#relatedItemTitle">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            title - Title of the resource related to the dataset.
          </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 - Resolvable URL representing the resource, preferably human readable.
          </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" 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 - Relation to resource identifier.
          </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 - A resource type of the related resource.
          </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.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="resource" type="ccmm:resource"/>
</xs:schema>
