You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
Useful using the Import tool, so that list doesn't grow when importing twice (and when there is not a set number of items, in which case each of them could be specifically targeted using dotted paths like translations: odisp:name.0.v). However, not that useful outside import, since this doesn't happen.
Checking unicity of primitive fields is easy. For Resource types (links or embedded sub-Resources), obviously id is their URI (@id). By the way, in the case of embedded sub-Resources, obviously it would work even better with server-side auto id building (#89). Additionally, i18n should be supported as a specific case where id is the language.
Would not work for field types without defined id, i.e. maps. But the solution would be replacing maps by embedded sub-Resources - which is a good general goal (the alternative being ).
This is best done on server-side, by adding a boolean "isSet" option to DCList, and using it in ResourceEntityMapperService to parse it in a Java LinkedHashSet (preserving order) rather than a mere list. In the Import tool, a new corresponding "isSet" column must be parsed from model csv and sent along.
(it could also be done only on client side, but server-side code will be simpler, better tested and obviously more efficient)
The text was updated successfully, but these errors were encountered:
This would also allow a smarter PATCH-like / POST / merge behaviour: merging two versions of a Resource having such a set list field would mean also merging their set lists (and recursively if their items are sub-Resources) rather than merely replacing the first's by the second's. Notably useful to merge a project's (set) list of dcmp:visibleProjects.
mdutoo
changed the title
Alternate "set" behaviour & mode for List field
Alternate "set" behaviour & mode for List field in import tool
Jan 14, 2016
mdutoo
changed the title
Alternate "set" behaviour & mode for List field in import tool
Alternate "set" behaviour & mode for List field & in import tool
Jan 14, 2016
Useful using the Import tool, so that list doesn't grow when importing twice (and when there is not a set number of items, in which case each of them could be specifically targeted using dotted paths like translations: odisp:name.0.v). However, not that useful outside import, since this doesn't happen.
Checking unicity of primitive fields is easy. For Resource types (links or embedded sub-Resources), obviously id is their URI (@id). By the way, in the case of embedded sub-Resources, obviously it would work even better with server-side auto id building (#89). Additionally, i18n should be supported as a specific case where id is the language.
Would not work for field types without defined id, i.e. maps. But the solution would be replacing maps by embedded sub-Resources - which is a good general goal (the alternative being ).
This is best done on server-side, by adding a boolean "isSet" option to DCList, and using it in ResourceEntityMapperService to parse it in a Java LinkedHashSet (preserving order) rather than a mere list. In the Import tool, a new corresponding "isSet" column must be parsed from model csv and sent along.
(it could also be done only on client side, but server-side code will be simpler, better tested and obviously more efficient)
The text was updated successfully, but these errors were encountered: