<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.deegree.org/ogcapi/features"
        xmlns:oaf="http://www.deegree.org/ogcapi/features"
        elementFormDefault="qualified" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" jaxb:version="3.0">
  <annotation>
    <appinfo>
      <jaxb:schemaBindings>
        <jaxb:package name="org.deegree.services.ogcapi.features"/>
      </jaxb:schemaBindings>
    </appinfo>
  </annotation>

  <element name="deegreeOAF">
    <complexType>
      <sequence>
        <element name="FeatureStoreId" minOccurs="0" maxOccurs="unbounded" type="string"/>
        <element name="UseExistingGMLSchema" minOccurs="0" type="boolean" default="true"/>
        <element name="QueryCRS" type="string" minOccurs="0" maxOccurs="unbounded"/>
        <element name="QueryMaxItems" type="positiveInteger" minOccurs="0" default="1000"/>
        <element name="DateTimeProperties" minOccurs="0">
          <complexType>
            <sequence>
              <element name="DateTimeProperty" type="oaf:DateTimePropertyType" maxOccurs="unbounded"/>
            </sequence>
          </complexType>
        </element>
        <element name="GeometryProperties" minOccurs="0">
          <complexType>
            <sequence>
              <element name="GeometryProperty" type="oaf:GeometryPropertyType" maxOccurs="unbounded"/>
            </sequence>
          </complexType>
        </element>
        <element name="HtmlViewId" type="string" minOccurs="0"/>
        <element name="Metadata" type="oaf:MetadataType" minOccurs="0"/>
        <element name="ConfigureCollection" minOccurs="0" maxOccurs="unbounded">
          <complexType>
            <sequence>
              <element name="AddLink" minOccurs="0" maxOccurs="unbounded" type="oaf:AddLink"/>
            </sequence>
            <attribute name="id" type="string"/>
          </complexType>
        </element>

        <element name="ConfigureCollections" minOccurs="0" maxOccurs="unbounded">
          <complexType>
            <sequence>
              <element name="AddLink" minOccurs="0" maxOccurs="unbounded" type="oaf:AddLink"/>
            </sequence>
          </complexType>
        </element>

      </sequence>
    </complexType>
  </element>


  <complexType name="AddLink">
    <attribute name="href" type="string"/>
    <attribute name="rel" type="string"/>
    <attribute name="type" type="string"/>
    <attribute name="title" type="string"/>
  </complexType>

  <complexType name="DateTimePropertyType">
    <sequence>
      <element name="FeatureTypeName" type="QName"/>
      <element name="PropertyName" type="QName"/>
    </sequence>
  </complexType>

  <complexType name="GeometryPropertyType">
    <sequence>
      <element name="FeatureTypeName" type="QName"/>
      <element name="PropertyName" type="QName"/>
    </sequence>
    <attribute name="skipExportAsWkt" type="boolean" default="false"/>
  </complexType>

  <complexType name="MetadataType">
    <sequence>
      <element name="ProviderLicense" minOccurs="0" type="oaf:LicenseType"/>
      <element name="DatasetLicense" minOccurs="0" type="oaf:LicenseType"/>
      <element name="DatasetCreator" minOccurs="0">
        <complexType>
          <sequence>
            <element name="Name" type="string"/>
            <element name="Url" type="string" minOccurs="0"/>
            <element name="EMail" type="string" minOccurs="0"/>
          </sequence>
        </complexType>
      </element>
      <element name="MetadataURL" minOccurs="0" maxOccurs="unbounded">
        <complexType>
          <simpleContent>
            <extension base="string">
              <attribute name="format" type="string"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </sequence>
  </complexType>

  <complexType name="LicenseType">
    <sequence>
      <element name="Name" type="string"/>
      <choice>
        <element name="Description" type="string"/>
        <element name="Url">
          <complexType>
            <simpleContent>
              <extension base="string">
                <attribute name="format" type="string" default="text/html"/>
              </extension>
            </simpleContent>
          </complexType>
        </element>
      </choice>
    </sequence>
  </complexType>
</schema>
