Closed kilchenmann closed 4 years ago
The ReadStillImageFileValue is defined in the read-property-item. Not sure if it's the right place.
A resource that has a file value (property) must belong to one of the subclass of kb:Representation
(s. https://docs.knora.org/paradox/02-knora-ontologies/knora-base.html#representations)
So, it's a representation with the following subclasses?
I would like to discuss this in the context of the library that communicates with the Knora API that @andreas-aeschlimann is currently working on. In some cases, it it is necessary to do more than one call to the API in order to obtain all the information, e.g., when dealing with a compound resource that has parts pointing to it or a still image resource with regions.
A working prototype of this functionality is currently implemented in https://github.com/dhlab-basel/beol/blob/develop/src/app/resource/beol-resource.ts
ReadResource
is populated in steps: after a full resource request more and more information is queried and attached to the resource like stillImageRepresentationsToDisplay
. This happens asynchronously, so Angular components have to deal with partial information.
Also we have to think about a class model so that we can support creation of resources and adding and modifying properties.
@kilchenmann @flavens Please see https://github.com/dhlab-basel/knora-api-js-lib/issues/5
At the moment we get a resource object back from resource service together with the convert-jsonld and the ontology-cache-service:
The array of resources — because it’s always a sequence — contains a property called "stillImageRepresentationsToDisplay". Not generic enough for me. There are missing properties along the incomingRegions, incomingStillImageRepresentation and stillImageRepresentationToDisplay, like incomingSequences, incomingMovingImageRepresentation, incomingAudioRepresentation, incomingTextRepresentation or incomingDocumentRepresentation but also movingImageRepresentationToDisplay, audioRepresentationToDisplay, documentRepresentationToDisplay, textRepresentationToDisplay etc. This will "explode" the resource object and at the end it’s hard to filter or to use in an html template. We have to find a solution to create a more generic, but compact resource object