Closed ioverka closed 8 years ago
AFAIK you cannot actually use the same profile across collections (which may be desirable, I guess). You can just create a collection with a copy of an existing profile, i.e. a profile with the same metadata fields and types - alas with different IDs for all fields as well as for the profile itself. To do so, I think you have to specify "method": "copy"
in the request JSON.
To be honest, I think this behaviour is mis-guided. If the idea of imeji was to enable searches across collections, it should be possible to actually re-use (i.e. keep the ID of) at least metadata fields, if not whole profiles. What's implemented now basically conceals the intent of a collection creator to reuse a metadata field.
The behaviour as implemented also means that creating a collection and items programmatically is really complicated, even if you already know the profile you want to re-use:
Yes, you should can. The request should be: { ... "profile": { "id": "NL_s_h0I_tQU4l26", "method": "reference" } }
The profile is then only referenced. Meanings, it might be changed by its owner (if not you), and affect your data.
@bastiensaquet Is this feature documented somewhere? And what does "affect your data" mean? I find it difficult to reconcile the rigidity implied by a schema or profile with the ability to edit it unilaterally.
Maybe single metadata fields may provide a better level for sharing? In this scenario, all metadata fields defined in any profile would contribute to a shared vocabulary which could be re-used in other profiles?
In our context it is convenient to reference a complete profile, because we "own" this particular profile. If there is ever a need to extend/revise the profile, this change will automatically been applied to all of our collections.
But I agree that shareable metadata fields would bring some benefits as well, e.g. I guess that all profiles include a "title" element, but Spot won't be able to offer a title search spanning collections using different md profiles.
@bastiensaquet ahhhh... adding some details of the meaning and possible values of "method" would really improve the API documentation from my point of view, see https://github.com/imeji-community/imeji/wiki/Collections:-Create-a-new-collection.
I have updated the documentation, did not notice it was not there, see https://github.com/imeji-community/imeji/wiki/Collections:-Create-a-new-collection.
We have discussed in team already on several occasions the potential of shared vocabularies - indeed this is something which can even allow for matching metadata fields across different profiles and different ontologies - matching concepts from different ontologies would be a very good benefit from it.
@natasab .. perfect, that was fast :)
please close this ticket if its more clear now. Other topics discussed throughout this ticket should be opened separately if necessary.
Context: DokDisTool (MPDL Information)
I'm not able to reuse an existing metadata profile while creating a new collection. It looks like the profile ID provided as part of th ecollection json is ignored. The new collection is created with a new/empty profile, see details below:
Request:
Content body of response: Response Body
What am I doing wrong?