BrAPI icon indicating copy to clipboard operation
BrAPI copied to clipboard

Add germplasm Photos

Open cpommier opened this issue 1 year ago • 5 comments

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 avatar Apr 15 '24 09:04 cpommier

What do you think @Nicolas971 @cmichotey

cpommier avatar Apr 15 '24 10:04 cpommier

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 ?

Nicolas971 avatar Apr 15 '24 10:04 Nicolas971

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

cpommier avatar Apr 15 '24 11:04 cpommier

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.

BrapiCoordinatorSelby avatar Apr 15 '24 14:04 BrapiCoordinatorSelby

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"
           }
]

cpommier avatar May 28 '24 14:05 cpommier