plantbreeding / BrAPI

Repository for version control of the BrAPI specifications
https://brapi.org
MIT License
55 stars 32 forks source link

Add germplasm Photos #593

Open cpommier opened 5 months ago

cpommier commented 5 months ago

each germplasm can have several descriptive pictures (grain, leaf, flower, ...) we could add the following structure to germplasm:


 "medias": [
{
      "mime-type":"",
      "file": "https://urgi.versailles.inrae.fr/files/siregal/images/accession/CEREALS/6027_Mult13_Epi.jpg",
      "copyright": "INRA,  2013",
      "name": "RECITAL spike",
      "description": "Spike ; field multiplication 2013",
      "thumbnailFile": "https://urgi.versailles.inrae.fr/files/siregal/images/accession/CEREALS/thumbnails/thumb_6027_Mult13_Epi.jpg"
    },

]
cpommier commented 5 months ago

What do you think @Nicolas971 @cmichotey

Nicolas971 commented 5 months ago

Dans le cas où la base local a beaucoup de photo associé à une accession, y-a-t-il une façon de faire remonter la ou les photos principales ou prioritaires ? On affichera sans doute pas l'ensemble des photos dispos dans les bases locales ? Une propriété d'ordre ?

cpommier commented 5 months ago

We could add an order field indeed. Not sure it will be filled though

BrapiCoordinatorSelby commented 5 months ago

The proposed structure above has almost a full overlap with the existing BrAPI Image entity. I would propose something like this:

"media": [
    {
        "imageDbId": "xyz",
        "imageName": "XYZ"
    }
]

You could add an order field, or you could rely on the natural order of the array, or you could look at Image.descriptiveOntologyTerms a list of descriptive tags for each image. Tag one of the images as "Primary Display" or something like that. I'm not sure if there is an official ontology or controlled vocabulary for something like that, but BrAPI won't care.

cpommier commented 3 months ago

After discussion with Alice, Nicolas, Célia, Francianne, we propose:

       "germplasm":{
            "accessionNumber": "A0000003",
             [...],
          "media": [
           {
                "imageDbId": "xyz",
               "imageName": "XYZ",
               "imageURL": "http://foo.bar/baz"
           },
           {
                "imageDbId": "xyz2",
               "imageName": "XYZ2",
               "imageURL": "http://foo.bar/baz2"
           }
]