glis.yml 51.8 KB
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#
# Copyright 2017 Global Crop Diversity Trust
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

17
swagger:                            '2.0'
18
info:
19
  description:                      >-
20
    Genesys API client to the Global Information System (GLIS) for PGRFA  [https://glis.planttreaty.org](https://glis.planttreaty.org).
21 22 23
  version:                          1.0.0
  title:                            Global Information System API Client
  termsOfService:                   'https://glis.planttreaty.org/terms/'
24
  contact:
25 26 27
    name:                           Genesys PGR
    url:                            https://www.genesys-pgr.org
    email:                          helpdesk@genesys-pgr.org
28
  license:
29 30 31
    name:                           Apache 2.0
    url:                            'http://www.apache.org/licenses/LICENSE-2.0.html'
host:                               glistest.planttreaty.org
32 33 34
schemes:
  - https
security:
35 36
  - {}
  - easySmta:                       []
37 38
parameters:
  page:
39 40 41 42 43 44
    name:                           page
    in:                             query
    description:                    Request a particular page
    type:                           integer
    required:                       false
    default:                        1
45
  perPage:
46 47 48 49 50 51
    name:                           per-page
    in:                             query
    description:                    The number of items returned in a single page
    type:                           integer
    required:                       false
    default:                        10
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
  acceptLanguge:
    name:                           Accept-Language
    in:                             header
    description:                    Tags to filter by
    required:                       false
    type:                           array
    items:
      type:                         string
      enum:                         &LANGUAGE
        - en
        - fr
        - es
        - ar
        - ru
        - zh
    default:                        en

69
tags:
70 71
  - name:                           query
    description:                    GLIS Query API about PGRFA
72
    externalDocs:
73 74
      description:                  Find out more
      url:                          'https://glis.planttreaty.org'
75 76 77 78 79
  - name:                           manager
    description:                    Manage PGRFA in GLIS
    externalDocs:
      description:                  Global Information System XML integration protocol
      url:                          'https://glis.planttreaty.org'
80
paths:
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
  /glis/xml/register:
    post:
      tags:
        - manager
      summary:                      Register PGRFA in GLIS and (potentially) obtain GLIS-minted DOI
      security:                     []
      description:                  >-
        The purpose of this transaction is to obtain a DOI associated to the PGRFA by providing a set of descriptors in the registration request. However, if a DOI obtained through a service other than GLIS is already associated to the PGRFA, it must be provided in the request so that GLIS will not assign a new DOI but just adopt the one provided.
      operationId:                  registerPGRFA
      consumes:
        # - application/json
        - application/xml
      produces:
        - application/xml
      parameters:
        - in:                       body
          name:                     pgrfa
          description:              Register PGRFA in GLIS and obtain GLIS DOI.
          schema:
            $ref:                   '#/definitions/Registration'

      responses:
        '200':
          description:              Successful operation
          schema:
            $ref:                   '#/definitions/RegistrationResponse'
        '400':
          description:              XML input invalid
          schema:
            $ref:                   '#/definitions/ApiError'
        '403':
          description:              Authentication failure
          schema:
            $ref:                   '#/definitions/ApiError'


  /glis/xml/update:
    post:
      tags:
        - manager
      summary:                      Update PGRFA in GLIS
      security:                     []
      description:                  >-
        Update information on PGRFA already registered in GLIS.
      operationId:                  updatePGRFA
      consumes:
        # - application/json
        - application/xml
      produces:
        - application/xml
      parameters:
        - in:                       body
          name:                     pgrfa
          description:              Update PGRFA in GLIS by DOI.
          schema:
            $ref:                   '#/definitions/GLISUpdate'

      responses:
        '200':
          description:              Successful operation
          schema:
            $ref:                   '#/definitions/RegistrationResponse'

Matija Obreza's avatar
Matija Obreza committed
144
  /glisapi/v1/pgrfas:
145 146
    get:
      tags:
Matija Obreza's avatar
Matija Obreza committed
147
        - query
Matija Obreza's avatar
Matija Obreza committed
148 149 150
      summary:                      Find passport data on PGRFA in GLIS
      description:                  ''
      operationId:                  search
151 152 153 154 155 156 157
      produces:
        - application/json
        - application/xml
        - application/brapi
        - application/zip
        - application/ld+json
      parameters:
Matija Obreza's avatar
Matija Obreza committed
158 159
        - $ref:                     '#/parameters/page'
        - $ref:                     '#/parameters/perPage'
160
        - $ref:                     '#/parameters/acceptLanguge'
Matija Obreza's avatar
Matija Obreza committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
        - name:                     doi
          in:                       query
          description:              >-
            Digital Object Identifier (DOI) associated to the PGRFA
          required:                 false
          type:                     string
        - name:                     identifier
          in:                       query
          description:              >-
            Any identifier associated with the PGRFA, excluding the DOI
          required:                 false
          type:                     string
        - name:                     genus
          in:                       query
          description:              >-
            Genus of the PGRFA
          required:                 false
          type:                     string
        - name:                     species
          in:                       query
          description:              >-
            Species and other taxonomic elements
          required:                 false
          type:                     string
        - name:                     name
          in:                       query
          description:              >-
            Any name associated with the PGRFA
          required:                 false
          type:                     string
        - name:                     holdwiews
          in:                       query
          description:              >-
            FAO/WIEWS Institute code of the holding institution
          required:                 false
          type:                     string
        - name:                     holdpid
          in:                       query
          description:              >-
            Easy-SMTA PID of the holding institution or person
          required:                 false
          type:                     string
        - name:                     holdname
          in:                       query
          description:              >-
            Name and surname for persons or Organization name of the holding institution or person
          required:                 false
          type:                     string
        - name:                     holdcountry
          in:                       query
          description:              >-
            ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the holding institution or person
          required:                 false
          type:                     string
        - name:                     methodcode
          in:                       query
          description:              >-
            Code of the method through which the PGRFA has been acquired. See Table 1 for the codes accepted by this element. TODO enum
          required:                 false
          type:                     string
        - name:                     provwiews
          in:                       query
          description:              >-
            FAO/WIEWS Institute code of the providing institution
          required:                 false
          type:                     string
        - name:                     provpid
          in:                       query
          description:              >-
            Easy-SMTA PID of the providing institution or person
          required:                 false
          type:                     string
        - name:                     provname
          in:                       query
          description:              >-
            Name and surname for persons or Organization name of the providing institution
          required:                 false
          type:                     string
        - name:                     provcountry
          in:                       query
          description:              >-
            ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the providing institution or person
          required:                 false
          type:                     string
        - name:                     provenance
          in:                       query
          description:              >-
            ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the providing institution or person
          required:                 false
          type:                     string
        - name:                     collwiews
          in:                       query
          description:              >-
            FAO/WIEWS Institute code of the collecting institution
          required:                 false
          type:                     string
        - name:                     collpid
          in:                       query
          description:              >-
            Easy-SMTA PID of the collecting institution or person
          required:                 false
          type:                     string
        - name:                     collname
          in:                       query
          description:              >-
            Name and surname for persons or Organization name of the collecting institution or person
          required:                 false
          type:                     string
        - name:                     collcountry
          in:                       query
          description:              >-
            ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the collecting institution or person
          required:                 false
          type:                     string
        - name:                     bredwiews
          in:                       query
          description:              >-
            FAO/WIEWS Institute code of the breeding institution
          required:                 false
          type:                     string
        - name:                     bredpid
          in:                       query
          description:              >-
            Easy-SMTA PID of the breeding institution or person
          required:                 false
          type:                     string
        - name:                     bredname
          in:                       query
          description:              >-
            Name and surname for persons or Organization name of the breeding institution or person
          required:                 false
          type:                     string
        - name:                     bredcountry
          in:                       query
          description:              >-
            ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the breeding institution or person
          required:                 false
          type:                     string
        - name:                     biostatus
          in:                       query
          description:              >-
            Code of the biological status of sample (MCPD SAMPSTAT).
          required:                 false
          type:                     string
        - name:                     mlsstatus
          in:                       query
          description:              >-
            Code for the inclusion into the Multilateral System.
          required:                 false
          type:                     string
        - name:                     targetkw
          in:                       query
          description:              >-
            Code for the keyword for a target associated to the PGRFA. To obtain the list of keyword codes, please see "Controlled vocabulary query".
          required:                 false
          type:                     string
317 318 319

      responses:
        '200':
Matija Obreza's avatar
Matija Obreza committed
320
          description:              Successful operation
321
          schema:
Matija Obreza's avatar
Matija Obreza committed
322
            type:                   array
323
            items:
Matija Obreza's avatar
Matija Obreza committed
324
              $ref:                 '#/definitions/PGRFA'
325
          examples:
Matija Obreza's avatar
Matija Obreza committed
326 327
            application-json:       >-
              [{
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400
                 "doi":             "10.0155/151D",
                 "url":             "https://52.70.89.68/glis/entity/doi-search?doi=10.0155/151D",
                 "user":            {
                   "name":          "CGN",
                   "wiews":         null,
                   "pid":           "00AC55",
                   "address":       null,
                   "country":       "NLD"
                 },
                 "info":            {
                   "modified":      "2017-06-21T09:06:36+01:00"
                 },
                 "M01":             {
                   "name":          "International Rice Research Institute",
                   "wiews":         "PHL001",
                   "pid":           null,
                   "address":       "DAPO BOX 7777\n1099 Metro Manila",
                   "country":       "PHL"
                 },
                 "M02":             "IRGC 125879",
                 "M03":             "2010-05",
                 "M04":             {
                   "code":          "acqu",
                   "desc":          "Acquisition"
                 },
                 "M05":             {
                   "genus":         "Oryza",
                   "names":         ["PUTTIGE::IRGC 52588-1"]
                 },
                 "R01":             [{
                   "url":           "http://oryzasnp.org/iric-portal/_variety.zul?irisid=IRIS%20313-8921",
                   "kws":           ["5"]
                 }, {
                   "url":           "https://www.genesys-pgr.org/acn/id/4332625",
                   "kws":           ["6"]
                 }],
                 "R03":             null,
                 "R04":             {
                   "species":       "sativa",
                   "spauth":        "L.",
                   "subtaxa":       null,
                   "stauth":        null
                 },
                 "R05":             ["T1528/2009", "IRGC 125879"],
                 "R06":             [],
                 "R07":             {
                   "code":          "12",
                   "desc":          "Art. 15 collection"
                 },
                 "R08":             true,
                 "A01":             {
                   "name":          null,
                   "wiews":         null,
                   "pid":           null,
                   "address":       null,
                   "country":       null
                 },
                 "A02":             null,
                 "A03":             "PHL",
                 "A04":             [],
                 "A05":             null,
                 "A06":             null,
                 "A07":             null,
                 "A08":             null,
                 "A09":             null,
                 "A10":             null,
                 "A11":             null,
                 "A12":             null,
                 "A13":             "0",
                 "A14":             null,
                 "A15":             null,
                 "A16":             [],
                 "A17":             null
Matija Obreza's avatar
Matija Obreza committed
401
               }]
402 403
          headers:
            X-Rate-Limit-Limit:
Matija Obreza's avatar
Matija Obreza committed
404 405 406
              type:                 integer
              description:          >-
                The maximum number of requests allowed for your IP for each time window.
407
            X-Rate-Limit-Remaining:
Matija Obreza's avatar
Matija Obreza committed
408 409 410
              type:                 integer
              description:          >-
                The number of requests that you can still make during the current time window.
411
            X-Rate-Limit-Reset:
Matija Obreza's avatar
Matija Obreza committed
412 413 414
              type:                 integer
              description:          >-
                The number of seconds to wait until the number of available requests is restored.
415
        '404':
Matija Obreza's avatar
Matija Obreza committed
416
          description:              PGRFA not found
417
        '429':
Matija Obreza's avatar
Matija Obreza committed
418
          description:              Too Many Requests
419
          schema:
Matija Obreza's avatar
Matija Obreza committed
420
            $ref:                   '#/definitions/RateLimitError'
421

Matija Obreza's avatar
Matija Obreza committed
422
  /glisapi/v1/rels:
423 424
    get:
      tags:
Matija Obreza's avatar
Matija Obreza committed
425
        - query
426 427
      summary:                      Get PGRFA relationships
      description:                  >-
Matija Obreza's avatar
Matija Obreza committed
428
        Multiple status values can be provided with comma separated strings
429
      operationId:                  listRelationships
430 431 432 433
      produces:
        - application/json
        - application/xml
      parameters:
434 435 436
        - name:                     doi
          in:                       query
          description:              >-
Matija Obreza's avatar
Matija Obreza committed
437
            Digital Object Identifier (DOI) associated to the PGRFA for which relations are requested. Mandatory
438 439 440 441 442
          required:                 true
          type:                     string
        - name:                     role
          in:                       query
          description:              >-
Matija Obreza's avatar
Matija Obreza committed
443 444 445 446 447 448
            Role of doi in the relationships. Optional, defaults to 'any'.

            Role in the relationship
            * any - Any role, default.
            * subject - DOI provided is the subject in the relationship.
            * object - DOI provided is the object in the relationship.
449 450
          required:                 false
          type:                     string
451
          items:
452
            type:                   string
453 454 455 456
            enum:
              - any
              - subject
              - object
457 458 459 460
            default:                any
        - name:                     oper
          in:                       query
          description:              >-
Matija Obreza's avatar
Matija Obreza committed
461 462 463 464 465 466
            Relational operator code to filter the relations. Optional; if specified, only the relations with the given operator will be returned.

            Relational code
            * acfr - Acquired from. The PGRFA was received from a Provider. The related DOI identifies the Provider's sample
            * crfr - Created from. The PGRFA was obtained through crossing parent PGRFAs. The related DOIs identify the parent samples
            * defr - Derived from. The PGRFA was obtained from another sample. The related DOI identifies such original sample
467 468
          required:                 false
          type:                     string
469
          items:
470
            type:                   string
471 472 473 474 475 476
            enum:
              - acfr
              - crfr
              - defr
      responses:
        '200':
477
          description:              successful operation
478
          schema:
479
            type:                   array
480
            items:
481
              $ref:                 '#/definitions/Relationship'
482
          examples:
483
            application-json:       >-
Matija Obreza's avatar
Matija Obreza committed
484
              [{
485 486 487
                "subject":          "10.0155/1",
                "oper":             "crfr",
                "object":           "10.0155/3"
Matija Obreza's avatar
Matija Obreza committed
488
              }, {
489 490 491
                "subject":          "10.0155/1",
                "oper":             "crfr",
                "object":           "10.0155/2"
Matija Obreza's avatar
Matija Obreza committed
492
              }]
493
        '400':
494
          description:              Invalid status value
495

Matija Obreza's avatar
Matija Obreza committed
496
  /glisapi/v1/terms:
497 498
    get:
      tags:
Matija Obreza's avatar
Matija Obreza committed
499
        - query
500 501
      summary:                      GLIS vocabularies
      description:                  >-
502
        To describe the kind of information that will be found in the targets, GLIS adopts a simple controlled vocabulary.
503
      operationId:                  listTerms
504 505 506 507
      produces:
        - application/json
        - application/xml
      parameters:
508
        - $ref:                     '#/parameters/acceptLanguge'
509 510
      responses:
        '200':
511
          description:              successful operation
512
          schema:
513
            type:                   array
514 515
            xml:
              name:                 pgrfas
516
            items:
517
              $ref:                 '#/definitions/Term'
518
          examples:
519 520
            application-json:       >-
              [{
521 522 523
                "code":             "1",
                "language":         "en",
                "term":             "plant genetics"
524
              }, {
525 526 527
                "code":             "2",
                "language":         "en",
                "term":             "bioinformatics"
528
              }]
529 530 531
            application-xml:        >-
              <?xml version="1.0" encoding="UTF-8"?>
              <pgrfas xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
                <item>
                  <code>5</code>
                  <language>en</language>
                  <term>Multimedia</term>
                </item>
                <item>
                  <code>4</code>
                  <language>en</language>
                  <term>Environments</term>
                </item>
                <item>
                  <code>3.8</code>
                  <language>en</language>
                  <term>Phenomics</term>
                </item>
547
              </pgrfas>
548

549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
  /glisapi/v1/holders:
    post:
      tags:
        - query
      summary:                      Query for holder of PGRFA by DOIs
      description:                  >-
        Query GLIS for WIEWS code of the holder for each submitted DOI. At this time, the call has a limit of 1,000 DOIs.
      operationId:                  listHolders
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in:                       body
          name:                     dois
          schema:
            $ref:                   '#/definitions/DOIArray'
      responses:
        '200':
          description:              successful operation
          schema:
            type:                   array
            items:
              $ref:                 '#/definitions/DOIHolder'

          examples:
            application-json:       >-
              [{
                "doi":              "10.0155/WW",
                "holdwiews":        "PHL001"
              }, {
                "doi":              "10.0155/XX",
                "holdwiews":        "PHL001"
              }]

584

585 586
securityDefinitions:
  easySmta:
587 588
    type:                           basic
    description:                    >-
Matija Obreza's avatar
Matija Obreza committed
589
      HTTP Basic authentication using Easy-SMTA login
590 591

definitions:
592
  # GLIS Term model
593
  Term:
594
    type:                           object
595 596 597 598
    required:
      - code
      - language
      - term
599 600
    properties:
      code:
601 602
        type:                       string
        description:                Unique term code
603
      language:
604 605
        type:                       string
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
606
          ISO-639-1 two-letter language code
607
        enum:                       *LANGUAGE
608
      term:
609 610
        type:                       string
        description:                Term
611 612

  # PGRFA Relationship model
613
  Relationship:
614
    type:                           object
615 616
    properties:
      subject:
617 618
        type:                       string
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
619
          The DOI of the PGRFA subject that was provided as search value
620
      oper:
621 622
        type:                       string
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
623
          The code of the relation operator.
624
      object:
625 626
        type:                       string
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
627
          The DOI of the PGRFA related to subject through oper
628 629

  # PGRFA model
630
  PGRFA:
631
    type:                           object
632 633 634 635
    required:
      - doi
    properties:
      doi:
636 637 638 639 640
        type:                       string
        pattern:                    '^10\.[0-9]+/.+$'
        example:                    '10.0155/1'
        title:                      DOI associated with PGRFA
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
641
          Digital Object Identifier (DOI) associated to the PGRFA
642
      url:
643 644 645
        type:                       string
        pattern:                    '^https?://.+$'
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
646
          GLIS landing page for the PGRFA
647
      user:
648 649
        title:                      GLIS registrant
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
650
          GLIS user account who registered the PGRFA
651
        $ref:                       '#/definitions/Location'
652
      M01:
653 654
        title:                      Organization/individual conserving the PGRFA
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
655
          The organization, individual or legal entity conserving the PGRFA
656
        $ref:                       '#/definitions/Location'
657
      M02:
658 659
        title:                      Local unique identifier of PGRFA
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
660
          The identifier that is used to identify the PGRFA material to distinguish it from other PGRFA conserved by the holder. Precisely one identifier is specified for the material.
661
        type:                       string
662
      M03:
663 664
        title:                      Acquisition date
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
665
          Date on which PGRFA came into management of the holder of the PGRFA. Date fragments are also accepted, e.g. when only year or year and month are defined.
666 667
        type:                       string
        pattern:                    '^\d{4}(\-\d{1,2}){0,2}'
668
      M04:
669 670
        title:                      Method
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
671
          Considering the date given for the previous field (Date), what event occurred on that date that resulted in the holder becoming the PGRFA holder.
672
        $ref:                       '#/definitions/TermValue'
673
      M05:
674 675
        title:                      Genus or crop name
        $ref:                       '#/definitions/Names'
676
      R01:
677 678
        title:                      Targets
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
679
          The URLs of websites where additional information on the PGRFA can be found. Each target is associated to one or more controlled vocabulary term code.
680
        type:                       array
681
        items:
682
          $ref:                     '#/definitions/Target'
683
      R03:
684 685
        title:                      Biological status
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
686
          Describes the conditions of provenance of the PGRFA. MCPD equivalent is Biological status of accession [SAMPSTAT].
687
        $ref:                       '#/definitions/TermValue'
688
      R04:
689 690 691 692
        title:                      Additional taxonomic category
        description:                >-
          Species:                  Specific epithet of the scientific name
          Species authority:        Authority for the specific epithet
Matija Obreza's avatar
Matija Obreza committed
693
          Subtaxa: Any additional infra-specific taxon: subspecies, variety, form, Group
694 695
          Subtaxon authority:       Authority for the subtaxon
        $ref:                       '#/definitions/Species'
696
      R05:
697 698
        title:                      Names
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
699
          Registered names or other designations, such as the name of a landrace, traditional variety or modern cultivar, or some other name or designation used to identify a breeder’s selection or elite line or variety.
700
        type:                       array
701
        items:
702
          type:                     string
703
      R06:
704 705
        title:                      Other identifiers
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
706
          Any other identifiers that have been assigned to identify the PGRFA material.
707
        type:                       array
708
        items:
709
          $ref:                     '#/definitions/OtherIdentifier'
710
      R07:
711 712
        title:                      MLS status
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
713
          The status of the PGRFA with regard to the Multilateral System of Access and Benefit-Sharing (MLS) of the International Treaty on Plant Genetic Resources for Food and Agriculture.
714

715 716 717 718 719 720 721
          * 0 Not available under the MLS
          * 1 Available under the MLS
          * 11 The sample is of a crop listed in Annex I and is under the management and control of a Contracting Party to the Treaty and declared to be in the public domain
          * 12 The sample is in a collection subject to an agreement concluded under Article 15 of the Treaty
          * 13 The holder received the sample with SMTA
          * 14 The holder has voluntarily placed the sample in the MLS
          * 15 The sample is derived from, and distinct from, material previously received from the MLS, is still under development and not yet ready for commercialization, and may be made available at the discretion of the developer
722
        $ref:                       '#/definitions/TermValue'
723
      R08:
724 725
        title:                      Physical existence
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
726
          Describes whether the PGRFA is still available or permanently lost after being registered.
727
        type:                       boolean
728
      A01:
729 730
        title:                      Provider's location
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
731
          Location or name of the person or organization that provided the PGRFA to the holder.
732
        $ref:                       '#/definitions/Location'
733
      A02:
734 735
        title:                      Provider's sample unique identifier
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
736
          Unique identifier used by the provider to identify the PGRFA under the provider’s management.
737
        type:                       string
738
      A03:
739 740
        title:                      Country of provenance
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
741
          ISO-3166 apha-3 code of country in which the PGRFA material was either collected or bred or selected, or the first country in the known history of the PGRFA.
742 743
        type:                       string
        pattern:                    '^.{3}$'
744
      A04:
745 746
        title:                      Collector's location
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
747
          Location of the home base of the person(s) or organization(s) that originally collected the PGRFA from in situ conditions.
748
        type:                       array
749
        items:
750
          $ref:                     '#/definitions/Location'
751
      A05:
752 753
        title:                      Collector's sample unique identifier
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
754
          Identifier assigned by the collector(s) to the PGRFA collected. MCPD equivalent is Collecting number [COLLNUMB].
755
        type:                       string
756
      A06:
757 758
        title:                      Collecting mission identifier
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
759
          The identifier, if any, of the mission during which the PGRFA was collected.
760
        type:                       string
761
      A07:
762 763
        title:                      Location where sample was collected
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
764
          Location information below the country level that describes where the PGRFA was collected.
765
        type:                       string
766
      A08:
767 768
        title:                      Latitude
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
769
          Latitude of the location where the PGRFA was collected in decimal degrees.
770
        type:                       number
771
      A09:
772 773
        title:                      Longitude
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
774
          Longitude of the location where the PGRFA was collected in decimal degrees.
775
        type:                       number
776
      A10:
777 778
        title:                      Uncertainty
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
779
          Uncertainty of the latitude/longitude coordinates of the location where the PGRFA was collected.
780
        type:                       string
781
      A11:
782 783
        title:                      Geodetic datum
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
784
          The geodetic datum or spatial reference system upon which the latitude/longitude coordinates of the collecting location are based.
785
        $ref:                       '#/definitions/TermValue'
786
      A12:
787 788
        title:                      Georeferencing method
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
789
          The method used to estimate latitude/longitude coordinates of the location where the PGRFA was collected.
790
        $ref:                       '#/definitions/TermValue'
791
      A13:
792 793
        title:                      Elevation
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
794
          Elevation of collecting site.
795
        type:                       number
796
      A14:
797 798 799
        title:                      Collecting date
        type:                       string
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
800
          Date on which the PGRFA was collected. Partial dates are allowed (YYYY-MM?-DD?).
801
        pattern:                    '^\d{4}(\-\d{1,2}){0,2}'
802
      A15:
803 804
        title:                      Collecting source
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
805
          A description of the nature of the location where the PGRFA was collected.
806
        $ref:                       '#/definitions/TermValue'
807
      A16:
808 809
        title:                      Breeder's location
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
810
          Location where the material was bred.
811
        type:                       array
812
        items:
813
          $ref:                     '#/definitions/Location'
814
      A17:
815 816
        title:                      Ancestry
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
817
          The pedigree (genealogy) or other description of the ancestry of the PGRFA and how it was bred.
818
        type:                       string
819 820 821

      # Moreover, an info element is also added containing the following elements:
      info:
822
        $ref:                       '#/definitions/UpdateInformation'
823

824
  # PGRFA Actor model
825 826
  Actor:
    type:                           object
827
    properties:
828 829
      wiews:
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
830
        description:                FAO/WIEWS Institute code
831 832 833 834
        pattern:                    '^[A-Z]{3}[0-9]{3,4}$'
        example:                    'NLD037'
      pid:
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
835
        description:                Easy-SMTA PID
836 837 838
        example:                    '1337'
      name:
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
839
        description:                Name
840
        example:                    'Centre for Genetic Resources, Wageningen University and Research Centre'
841
      address:
842
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
843
        description:                Address
844
        example:                    '6700 AA Wageningen, The Netherlands'
845
      country:
846 847 848
        type:                       string
        title:                      ISO3 Country code
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
849
          ISO-3166 apha-3 country code
850 851 852
        pattern:                    '^.{3}$'
        example:                    'NLD'

853
  # PGRFA Location model
854 855 856 857 858 859 860
  Location:
    type:                           object
    description:                    >-
      The location element is the same as the actor element with the addition of geographical coordinates: latitude and longitude.
    allOf:
      - $ref:                       '#/definitions/Actor'
    properties:
861
      lat:
862
        type:                       number
Matija Obreza's avatar
Matija Obreza committed
863
        description:                Latitude in decimal degrees
864
      lon:
865
        type:                       number
Matija Obreza's avatar
Matija Obreza committed
866
        description:                Longitude in decimal degrees
867 868

  # PGRFA Target model
869
  Target:
870
    type:                           object
Matija Obreza's avatar
Matija Obreza committed
871 872
    description:                    >-
      The website where additional information on the PGRFA can be found.
873 874
    properties:
      url:
875
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
876
        description:                URL to PGRFA information
877
      kws:
878
        type:                       array
Matija Obreza's avatar
Matija Obreza committed
879
        description:                Keywords?
880
        items:
881
          type:                     string
882 883

  # PGRFA Names model
884
  Names:
885
    type:                           object
Matija Obreza's avatar
Matija Obreza committed
886 887
    description:                    >-
      Registered names or other designations, such as the name of a landrace, traditional variety or modern cultivar, or some other name or designation used to identify a breeder’s selection or elite line or variety.
888 889
    properties:
      genus:
890
        type:                       string
Matija Obreza's avatar
Matija Obreza committed
891
        description:                >-
892
      names:
893
        type:                       array
894
        items:
895
          type:                     string
896 897

  # Other identifier model
898
  OtherIdentifier:
899 900
    type:                           object
    description:                    >-
Matija Obreza's avatar
Matija Obreza committed
901
      Other identifier of material
902 903
    properties:
      type:
904 905
        title:                      Identifier type
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
906
          One of 'genesysid', 'accnum', etc.
907
        type:                       string
908
      value:
909 910
        title:                      The identifier used in the other system
        type:                       string
911 912

  # Term value model
913
  TermValue:
914
    type:                           object
915 916
    properties:
      code:
917
        type:                       string
918
      desc:
919
        type:                       string
920 921

  # Species model
922
  Species:
923
    type:                           object
924 925
    properties:
      species:
926
        type:                       string
927
      spauth:
928
        type:                       string
929
      subtaxa:
930
        type:                       string
931
      stauth:
932
        type:                       string
933 934

  # PGRFA Update information model
935
  UpdateInformation:
936
    type:                           object
937 938
    properties:
      modified:
939 940 941
        type:                       string
        format:                     date-time
        description:                >-
Matija Obreza's avatar
Matija Obreza committed
942 943
          The date of last change.
      doiregistered:
944 945
        type:                       string
        format:                     date-time
Matija Obreza's avatar
Matija Obreza committed
946 947
        description:                >-
          The date of DOI registration to the DataCite registry. If this element is missing or null, the DOI has not been registered yet and should therefore not be used in publications
948

949
  # Wrapper for DOI list
950 951 952 953 954 955 956 957 958 959 960 961 962 963
  DOIArray:
    title:                          Wrapper object for array of DOIs
    description:                    >-
      Used for DOI holder check.
    type:                           object
    properties:
      dois:
        type:                       array
        items:
          type:                     string
          example:
            - '10.0155/WW'
            - '10.0155/XX'

964
  # Model for DOI holder
965
  DOIHolder:
966 967 968
    title:                          DOI and WIEWS code of PGRFA holder
    description:                    >-
      The PGRFA DOI and the WIEWS code of its holder.
969 970 971 972 973 974 975 976 977
    type:                           object
    properties:
      doi:
        type:                       string
        example:                    '10.0155/WW'
      holderwiews:
        type:                       string
        example:                    'PHL001'

978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
  # Model for PGRFA update
  GLISUpdate:
    type:                           object
    title:                          GLISUpdate
    allOf:
      - $ref:                       '#/definitions/basePGRFA'
      - type:                       object
        xml:
          name:                     update
        required:
          - username
          - password
          - sampledoi

  # Model for PGRFA registration
  Registration:
    type:                           object
    title:                          GLISRegistration
    allOf:
      - $ref:                       '#/definitions/basePGRFA'
      - type:                       object
        xml:
          name:                     register
        required:
          - username
          - password
          - sampleid
          - genus
          - method
          - date
1008

1009 1010 1011 1012
  # Base model for Registration and Update
  basePGRFA:
    type:                           object
    properties:
1013
      # Authentication
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023
      username:
        type:                       string
        example:                    'cgn'
        xml:
          attribute:                true
      password:
        type:                       string
        example:                    'Passw0rd'
        xml:
          attribute:                true
1024 1025 1026 1027

      # Please follow the order in 'XML  request  object' section of the 'GLIS XML integration protocol'
      location:
        $ref:                       '#/definitions/Location'
1028 1029
      sampledoi:
        type:                       string
1030 1031
        ## TODO DOI regexp
        # format:                   uuid
1032 1033 1034 1035 1036
        description:                >-
          A Digital Object Identifier (DOI) obtained from a service other than GLIS and that is already assigned to the PGRFA.
      sampleid:
        type:                       string
        example:                    'CGN00001'
1037 1038
        description:                >-
          A string that identifies the PGRFA that is being registered. This value will be returned by GLIS in the response message and is assumed to be used to associate the DOI to the corresponding material in the local database. You must provide <sampleid> even if <sampledoi> is provided. In case you use the DOI as unique identifier in your local database, you can repeat it in <sampleid>. Mandatory. Please read more details in the “HTTPS reply” chapter.
1039 1040 1041 1042 1043 1044 1045 1046 1047
      date:
        type:                       string
        pattern:                    '^\d{4}(\-\d{1,2}){0,2}'
        description:                >-
          Date in which PGRFA became part of the collection. Date fragments (YYYY-MM and YYYY) are also accepted.
        example:                    '1987-06-23'
      method:
        type:                       string
        example:                    'acqu'
1048 1049
        description:                >-
          Method through which the PGRFA has been acquired. Mandatory.
1050 1051 1052 1053 1054 1055 1056 1057 1058
        items:
          type:                     string
          enum:
            - acqu
            - ihcp
            - ihva
            - nodi
            - obna
            - obin
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082
      genus:
        type:                       string
        description:                >-
          The taxon of the genus for the PGRFA. At least one between <genus> and <cropname> must be provided.
        example:                    'Hordeum'
      cropnames:
        type:                       array
        description:                >-
          Common name of the crop. At least one between <genus> and one cropname must be provided. Multiple names are allowed.
        xml:
          wrapped:                  true
          name:                     cropnames
        example:
          - 'Barley'
          - 'Wheat'
        items:
          type:                     string
          xml:
            name:                   name
          example:                  'Barley'
      targets:
        type:                       array
        items:
          $ref:                     '#/definitions/Target'
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
      progdoi:
        type:                       array
        description:                >-
          DOI of the progenitor PGRFA as registered in GLIS. Please note that the number of allowed DOIs depends on the method as follows

           * Acquisition - 1 DOI
           * In-house copy - 1 DOI
           * In-house variant - 1 DOI
           * Novel distinct PGRFA - 1 or more DOIs
           * Observation - Natural - 0 DOI
           * Observation – Inherited - 0 DOI
        example:                    ['10.0155/11', '10.0155/12']
        xml:
          wrapped:                  true
        items:
          type:                     string
          example:                  '10.0155/134'
          xml:
            name:                   doi
          description:              >-
            Progenitor DOI
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
      biostatus:
        type:                       integer
        description:                >-
          Biological status of the PGRFA.
        example:                    300
      species:
        type:                       string
        description:                >-
          Specific epithet of the PGRFA scientific name. If not provided, "sp." is assumed.
        example:                    'vulgare'
      spauth:
        type:                       string
        description:                >-
          Authority for the specific epithet.
        example:                    'L.'
      subtaxa:
        type:                       string
        description:                >-
          Any additional infra-specific taxon such as subspecies, variety, form, Group and so on.
        example:                    'subsp. vulgare'
      stauth:
        type:                       string
        description:                >-
          Authority for the subtaxon at the most detailed level provided.
        example:                    'L.'
      names:
        type:                       array
        description:                >-
          Other name of the PGRFA. Any number of names can be provided.
        xml:
          wrapped:                  true
        example:                    ['a', 'b']
        items:
          type:                     string
          xml:
            name:                   name
      ids:
        type:                       array
        xml:
          wrapped:                  true
        example:                    ['a', 'b']
        items:
          type:                     string
          # TODO
          xml:
            name:                   id
      mlsstatus:
        type:                       integer
        description:                >-
          Code that identifies the status of the PGRFA with regard to the MLS.
        example:                    1
      historical:
        type:                       string
        maxLength:                  1
        description:                >-
          Indicates whether the PGRFA currently exists. Allowed value is y/n
        example:                    n
      acquisition:
        $ref:                       '#/definitions/Acquisition'
      collection:
        $ref:                       '#/definitions/Collection'
      breeding:
        $ref:                       '#/definitions/Breeding'

  # Model for Acquisition
  Acquisition:
    type:                           object
    title:                          Acquisition
    required:
      - provider
    properties:
      provider:
        $ref:                       '#/definitions/Actor'
      sampleid:
        type:                       string
      provenance:
        type:                       string
        description:                >-
          ISO-3166 alpha-3 country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) of the country of provenance.
        pattern:                    '^.{3}$'
        example:                    'DEU'

  # Model for Collection
  Collection:
    type:                           object
    title:                          Collection
    properties:
      collectors:
        type:                       array
        xml:
          wrapped:                  true
          name:                     collectors
        items:
          $ref:                     '#/definitions/Collector'
          xml:
            name:                   collector
      sampleid:
        type:                       string
      missid:
        type:                       string
      site:
        type:                       string
      lat:
        type:                       string
      lon:
        type:                       string
      uncert:
        type:                       string
      datum:
        type:                       string
      georef:
        type:                       string
      elevation:
        type:                       integer
        description:                >-
          Elevation of collecting site in metres above sea level.
      date:
        type:                       string
        description:                >-
          Date on which the PGRFA was collected. Date fragments (YYYY-MM and YYYY) are also accepted.
        pattern:                    '^\d{4}(\-\d{1,2}){0,2}'
      source:
        type:                       string
        description:                >-
          Code of the nature of the location where the PGRFA was collected.

  # Model for Collector
  Collector:
    type:                           object
    title:                          Collector
    allOf:
      - $ref:                       '#/definitions/Actor'
    xml:
      name:                         collector

  # Model for Breeding
  Breeding:
    type:                           object
    title:                          Breeding
    properties:
      breeders:
        type:                       array
        xml:
          wrapped:                  true
          name:                     breeders
        items:
          $ref:                     '#/definitions/Breeder'
      ancestry:
        type:                       string
        description:                >-
          Pedigree or other description of the ancestry of the PGRFA and how it was bred.

  # Model for Breeder
  Breeder:
    allOf:
      - $ref:                       '#/definitions/Actor'
    xml:
      name:                         breeder

1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274