<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?enunciate-assumed-base-uri ./?>
<wadl:application xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <wadl:doc xmlns:enunciate="http://enunciate.webcohesion.com/" enunciate:generatedBy="Enunciate-2.0"/>
  
  <wadl:grammars>
  </wadl:grammars>

  <wadl:resources base="./">

    <wadl:resource path="rest/countries">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Lists all the countries for which DSS models exist]]></wadl:doc>
        <wadl:request>
          <wadl:param name="platformValidated" style="query">
            <wadl:doc><![CDATA[true or false (default). If true, return information only for
DSS models that have platform_validated set to true in the metadata]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/crop">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[A list of <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a> for all crops
that the DSS models (both validated and unvalidated) cover in the platform]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[List all DSSs and models available in the platform]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of all DSSs and models available in the platform, regardless of validation]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/pest">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[A list of <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a>
for all pests that the DSS models in the platform deal with in some way.]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="tools/codes2prefnames">
      <wadl:method name="POST">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:request>
          <wadl:representation mediaType="multipart/form-data">
            <wadl:param name="authtoken" style="query">
              <wadl:doc><![CDATA[]]></wadl:doc>
            </wadl:param>
            <wadl:param name="intext" style="query">
              <wadl:doc><![CDATA[]]></wadl:doc>
            </wadl:param>
          </wadl:representation>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/admin/heartbeat">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss/location">
      <wadl:method name="POST">
        <wadl:doc><![CDATA[Search for DSS models that have been validated for the specific location.
The location can by any valid Geometry, such as Point or Polygon.
Example geoJson input
<pre>
 {
     "type": "FeatureCollection",
     "features": [
     {
     "type": "Feature",
     "properties": {},
     "geometry": {
     "type": "Point",
     "coordinates": [
     12.01629638671875,
     59.678835236960765
     ]
     }
     }
     ]
     }

 </pre>]]></wadl:doc>
        <wadl:request>
          <wadl:doc><![CDATA[valid <a href="https://geojson.org/">GeoJSON</a>]]></wadl:doc>
          <wadl:representation mediaType="application/json">
          </wadl:representation>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
          <wadl:param name="platformValidated" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[A list of all the matching DSS models]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss/{DSSId}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Get all information about a specific DSS]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[the requested DSS and its models, regardless of validation]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[the id of the DSS]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/risk_maps/list">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[List all Risk maps available in the platform]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[a list of all risk map providers and their risk maps offered through the platform]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/schema/dss">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/schema/fieldobservation">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[This returns the generic schema for field observations, containing the common
properties for field observations. These are location (GeoJson), time
(ISO-8859 datetime), EPPO Code for the pest and crop. In addition, quantification
information must be provided. This is specified in a custom schema, which
must be a part of the input_schema property in the DSS model metadata. So
in the configParameters property of the input_schema for a model, we may find:
<pre>
        "fieldObservations": {
            "title": "Field observations",
            "type": "array",
            "items": {
                "$ref": "https://platform.ipmdecisions.net/api/dss/rest/schema/fieldobservation"
            }
        },
        "fieldObservationQuantifications": {
            "title": "Field observation quantifications",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/definitions/fieldObs_SEPTAP"
                }
              ]
            }
        }
 </pre>

Both fieldObservations and fieldObservationQuantifications are arrays, so
for each fieldObservation object you must have a corresponding
quantification object. So fieldObservations[0] corresponds to
fieldObservationQuantifications[0] and so on.

The actual contents of the field observation quantification object is
structured by an entry in the definitions section of the input_schema. So
in our specific example, you will find:

<pre>
  "definitions": {
          "fieldObs_SEPTAP": {
            "title": "Septoria apiicola quantification", 
            "properties": {
              "observed":{
                "title":"observed", 
                "type":"boolean"
              }
            }
        }
 </pre>

Which is, admittedly, a very simple quantification. For the form builder,
the EPPO code for the pest is specified in the fieldObs_SEPTAP (after the
underscore). This should be sufficient for the form to build the correct
quantification fields when the user selects the pest (if observations
of more than one pest species are required/possible)]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[The generic schema for field observations]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/schema/geojson">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/schema/modeloutput">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[The Json Schema for the platform's standard for DSS model output]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/admin/dss/add">
      <wadl:method name="POST">
        <wadl:doc><![CDATA[Add or update DSS meta data. Please remember to update any version info, as
A DSS with same id and version as an existing one will be rejected.]]></wadl:doc>
        <wadl:request>
          <wadl:doc><![CDATA[in the POST body, provide YAML for the DSS]]></wadl:doc>
          <wadl:representation mediaType="application/x-yaml;charset=UTF-8">
          </wadl:representation>
          <wadl:param name="dryRun" style="query">
            <wadl:doc><![CDATA[true to test the endpoint without changing the state of the application. Null or false otherwise]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[the updated/new DSS meta data in YAML format]]></wadl:doc>
          <wadl:representation mediaType="application/x-yaml;charset=UTF-8"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/crop/execution_type/{executionType}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:request>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[A list of <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a> for all crops
that the DSS models in the platform]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="executionType" style="template">
        <wadl:doc><![CDATA[]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/crop/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:request>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[A list of <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a> for all crops
that the DSS models (validated or not validated) cover in the platform]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[set to true if you want to filter on DSSs that are validated]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crop/{cropCode}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given crop]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of ALL models that are applicable to the given crop, regardless of validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the crop]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crops/{cropCodes}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of DSS models that are applicable to the given crops]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given crops, regardless of validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCodes" style="template">
        <wadl:doc><![CDATA[comma separated <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a> for the crops]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/location/point">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Search for models that are valid for the specific point.]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
          <wadl:param name="latitude" style="query">
            <wadl:doc><![CDATA[in decimal degrees (WGS84)]]></wadl:doc>
          </wadl:param>
          <wadl:param name="longitude" style="query">
            <wadl:doc><![CDATA[in decimal degrees (WGS84)]]></wadl:doc>
          </wadl:param>
          <wadl:param name="platformValidated" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[A list of all the matching DSS models]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss/logo/{logoFileName}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:request>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="logoFileName" style="template">
        <wadl:doc><![CDATA[The file name of the logo.]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/pest/{pestCode}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given pest]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given pest, regardless of validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="pestCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the pest]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[List all DSSs and models available in the platform]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of all DSSs and models available in the platform that are either validated or not]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/summary/csv">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Outputs a]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)
* @param executionType filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[CSV summary of the models]]></wadl:doc>
          <wadl:representation mediaType="text/csv;charset=UTF-8"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss/{DSSId}/yaml">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Get all information about a specific DSS in YAML format]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[the requested DSS]]></wadl:doc>
          <wadl:representation mediaType="application/x-yaml;charset=UTF-8"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[the id of the DSS]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/model/{DSSId}/{ModelId}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Get all information about a specific DSS model]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[The requested DSS model]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[The id of the DSS containing the model]]></wadl:doc>
      </wadl:param>
      <wadl:param name="ModelId" style="template">
        <wadl:doc><![CDATA[The id of the DSS model requested]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/schema/fieldobservation/nolocation">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[]]></wadl:doc>
        <wadl:response>
          <wadl:doc><![CDATA[]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/schema/modeloutput/validate">
      <wadl:method name="POST">
        <wadl:doc><![CDATA[Validate model output against this schema: https://platform.ipmdecisions.net/api/dss/rest/schema/modeloutput]]></wadl:doc>
        <wadl:request>
          <wadl:representation mediaType="application/json">
          </wadl:representation>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[<code>{"isValid":"true"}</code> if the data is valid, <code>{"isValid":"false"}</code> otherwise]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/dss/{DSSId}/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Get all information about a specific DSS]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[the requested DSS and its models, filtered by their validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[the id of the DSS]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/model/{DSSId}/{ModelId}/input_schema">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Get the input Json schema for a specific DSS model]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[The input Json schema for the DSS model]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[The id of the DSS containing the model]]></wadl:doc>
      </wadl:param>
      <wadl:param name="ModelId" style="template">
        <wadl:doc><![CDATA[The id of the DSS model requested]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/schema/dss/yaml/validate">
      <wadl:method name="POST">
        <wadl:doc><![CDATA[Validate DSS YAML description file, using this Json schema: https://platform.ipmdecisions.net/api/dss/rest/schema/dss
Also checking that:
<ul>
<li>The EPPO codes are valid (checking against the EPPO database)</li>
<li>The input_schema is a valid Json schema</li>
<li>All models in this DSS have unique IDs (doesn't check against other DSS YAML files)</li>
</ul>]]></wadl:doc>
        <wadl:request>
          <wadl:representation mediaType="application/x-yaml;charset=UTF-8">
          </wadl:representation>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[<code>{"isValid":"true"}</code> if the data is valid, <code>{"isValid":"false","errorMessage":["These EPPO codes are not valid: PSILOR"],["Foo Bar Lorem Ipsum"]}</code> otherwise]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>

    <wadl:resource path="rest/admin/dss/{DSSId}/i18n/csv">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Generate a starting point for translation. Returns the keys and "default" column as CSV,
with comma as separator and double quotes for strings. So don't use double quotes in the text!]]></wadl:doc>
        <wadl:request>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[CSV file with translation for the given DSS and models regardless of validation status]]></wadl:doc>
          <wadl:representation mediaType="text/csv;charset=UTF-8"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crop/{cropCode}/pest/{pestCode}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given crop-pest combination]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given crop-pest combination, regardless of validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the crop]]></wadl:doc>
      </wadl:param>
      <wadl:param name="pestCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the pest]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crop/{cropCode}/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given crop]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given crop, filtered on validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the crop]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crops/{cropCodes}/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of DSS models that are applicable to the given crops]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given crops filtered by the models' validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCodes" style="template">
        <wadl:doc><![CDATA[comma separated <a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO codes</a> for the crops]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/pest/{pestCode}/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given pest]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given pest filtered by their validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="pestCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the pest]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/model/{DSSId}/{ModelId}/input_schema/ui_form">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Provide Json schema only for the parts that should be viewed in the platform's HTML UI form]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[The input Json schema for the DSS model, modified for the UI auto generation]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[The id of the DSS containing the model]]></wadl:doc>
      </wadl:param>
      <wadl:param name="ModelId" style="template">
        <wadl:doc><![CDATA[The id of the DSS model requested]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/admin/dss/{DSSId}/i18n/csv/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Generate a starting point for translation. Returns the keys and "default" column as CSV,
with comma as separator and double quotes for strings. So don't use double quotes in the text!]]></wadl:doc>
        <wadl:request>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[CSV file with translation for the given DSS and models filtered by validation status]]></wadl:doc>
          <wadl:representation mediaType="text/csv;charset=UTF-8"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="DSSId" style="template">
        <wadl:doc><![CDATA[]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>

    <wadl:resource path="rest/dss/crop/{cropCode}/pest/{pestCode}/platform_validated/{platformValidated}">
      <wadl:method name="GET">
        <wadl:doc><![CDATA[Returns a list of models that are applicable to the given crop-pest combination]]></wadl:doc>
        <wadl:request>
          <wadl:param name="executionType" style="query">
            <wadl:doc><![CDATA[filter for types of models. Example values are ONTHEFLY and LINK. See DSSModel.Execution for more]]></wadl:doc>
          </wadl:param>
          <wadl:param name="language" style="query">
            <wadl:doc><![CDATA[two-letter code for language (<a href="https://www.loc.gov/standards/iso639-2/php/code_list.php">ISO-639-1</a>)]]></wadl:doc>
          </wadl:param>
        </wadl:request>
        <wadl:response>
          <wadl:doc><![CDATA[a list of models that are applicable to the given crop-pest combination by their validation status]]></wadl:doc>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
      <wadl:param name="cropCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the crop]]></wadl:doc>
      </wadl:param>
      <wadl:param name="pestCode" style="template">
        <wadl:doc><![CDATA[<a href="https://www.eppo.int/RESOURCES/eppo_databases/eppo_codes">EPPO code</a> for the pest]]></wadl:doc>
      </wadl:param>
      <wadl:param name="platformValidated" style="template">
        <wadl:doc><![CDATA[true or false]]></wadl:doc>
      </wadl:param>
    </wadl:resource>
  </wadl:resources>
</wadl:application>
