Make repeatable simple fields unique by value #23
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
RDGraph
RSAC
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: D-Net/dnet-hadoop#23
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please introduce in the mapping from the MDStores applied to both Oaf and Odf records a mechanism to avoid repeating the same identical value in fields where it doesn't make sense to have the same information repeated several times.
For example, I just noticed the following record is bearing the same
dc:source
689 times<source>Journal of Preventive Medicine and Hygiene</source>
record id
od_______267::801c6dcec8f0a675871c2ca8ecabf75e
Clerarly the uniqueness criteria changes from type to type, so let's start with
eu.dnetlib.dhp.schema.oaf.Field
The best solution should be to modify the datamodel replacing all the occurences of List with Set.
I suggest to use the LinkedHashSet class because it preserve the order of the elements.
The Field class should also implement the hashCode() method.
I have implemented this fix: #25
You can accept the Pull Request, but I suggest you to update the Oaf classes with LinkedHashSets.
Thanks Michele, the PR integrated and the task to extend the model is tracked in #9 (comment)