Project

General

Profile

Actions

Feature #1980

open

API: Improve LOUD

Added by Bernhard Koschiček-Krombholz about 1 year ago. Updated 9 days ago.

Status:
In Progress
Priority:
Normal
Category:
API
Target version:
Start date:
2023-03-03
Estimated time:

Description

This issue is for further improvements of the LOUD format.

Question/answer/implementation

Q: Which property have the comments of the timespans? My guess is P3 has note
A:
I: P79 beginning is qualified and P80 end is qualified by.

Q: Would it be possible to have the main image implemented in the JSON-LD in the following way (based on https://linked.art/example/person/13.json)
A: Yes, it should be possible to display the main image.
I: The main image of an entity is shown with the "representation" key. But only image, which are actively marked as main image.

N: Include the shortcuts provided by https://manual.openatlas.eu/model/openatlas_shortcuts.html
I:


Related issues 1 (1 open0 closed)

Precedes OpenAtlas - Feature #2035: Linked Open Data Acknowledged2023-03-06Actions
Actions #1

Updated by Bernhard Koschiček-Krombholz about 1 year ago

  • Description updated (diff)
Actions #2

Updated by Stefan Eichert about 1 year ago

Currently I cannot distinguish which documents are image files that depict the respective entity. Would it be possible to have the main image (or if only one available, this one) implemented in the JSON-LD in the following way (based on https://linked.art/example/person/13.json):

{
@context: "https://linked.art/ns/v1/linked-art.json",
id: "https://linked.art/example/person/13",
type: "Person",
_label: "Gertrude H. Ingram",
representation: [
{
type: "VisualItem",
digitally_shown_by: [
{
id: "http://example.org/images/gertrude.jpg",
type: "DigitalObject",
classified_as: [
{
id: "http://vocab.getty.edu/aat/300215302",
type: "Type",
_label: "Digital Image" 
}
]
}
]
}
]
}
Actions #3

Updated by Bernhard Koschiček-Krombholz about 1 year ago

  • Description updated (diff)

I was sick, hence the late reply.
It is possible to add the images this way. One problem is, to my knowledge it is hard to get the information, which image is the "main" image. For the start, I will include all available images (only images with a license).

This representation will only be available for displayable file extensions as to our default config variable DISPLAY_FILE_EXTENSIONS = ['.bmp', '.gif', '.ico', '.jpeg', '.jpg', '.png', '.svg'].
OR we change the OpenAtlas model and in this progress the file upload, that images are E36 Visual Item. But I think this would be a major change and has to be discussed.

Actions #4

Updated by Alexander Watzinger about 1 year ago

Not sure which part of getting the "main" image is hard but giving info just in case:
This information is stored in web.entity_profile_image table just as an entity_id (unique), image_id relation.
In case no profile image is set, the first one (basically random) image is shown in the OpenAtlas backend. But I guess from the API side this isn't relevant and should be decided by the system asking for it.

Actions #5

Updated by Bernhard Koschiček-Krombholz about 1 year ago

  • Description updated (diff)

At the implementation of LPF, it was not as easy achievable. But ok, then it will make it easier to get the representing image. Thank you. I will try to implement it right away.

Actions #6

Updated by Alexander Watzinger about 1 year ago

There is already a function for this: Entity.get_profile_image_id(id_)
And, as added in the note before, in case there is none set the requesting system should decide if it wants to display a random one or not.

Actions #7

Updated by Bernhard Koschiček-Krombholz about 1 year ago

  • Description updated (diff)

Representation of the main image is implemented. For implementation to further display images, we should talk about changing the model or find another solution. I will set it on the next developer meeting.

Actions #8

Updated by Bernhard Koschiček-Krombholz about 1 year ago

  • Description updated (diff)
Actions #9

Updated by Bernhard Koschiček-Krombholz 9 months ago

  • Target version changed from 7.16.0 to 8.0.0
Actions #10

Updated by Bernhard Koschiček-Krombholz 9 months ago

  • Status changed from Assigned to Acknowledged
  • Assignee deleted (Bernhard Koschiček-Krombholz)
Actions #11

Updated by Bernhard Koschiček-Krombholz 7 months ago

Actions #12

Updated by Bernhard Koschiček-Krombholz 7 months ago

Actions #13

Updated by Bernhard Koschiček-Krombholz 7 months ago

Actions #14

Updated by Bernhard Koschiček-Krombholz 6 months ago

  • Status changed from Acknowledged to Assigned
  • Assignee set to Bernhard Koschiček-Krombholz
Actions #15

Updated by Bernhard Koschiček-Krombholz 6 months ago

  • Description updated (diff)

ad: Would it be possible to have the main image implemented in the JSON-LD in the following way.

I changed it the way, that all images are visible. I also added access_point and format. The profile image is not tagged in access_point with the "_label": "ProfileImage", e.g.:

"representation": [
      {
          "id": "http://127.0.0.1:5000/api/entity/132251",
          "_label": "Map of the Excavation Site of Doclea (Piero Sticotti, 1913).",
          "type": "DigitalObject",
          "format": "image/jpeg",
          "access_point": [
            {
              "id": "http://127.0.0.1:5000/api/display/132251",
              "type": "DigitalObject",
              "_label": "" 
            }
          ],
          "classified_as": {
            "id": "http://127.0.0.1:5000/api/entity/117260",
            "type": "Type",
            "_label": "Gemeinfrei" 
          }
        }
]

Next step is to include IIIF (https://linked.art/model/digital/)

Actions #16

Updated by Alexander Watzinger 5 months ago

  • Status changed from Assigned to In Progress
  • Target version changed from 8.0.0 to 8.4.0
Actions #17

Updated by Bernhard Koschiček-Krombholz 9 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF