-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upsert specimens #73
Upsert specimens #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about the writable PIDs, might have missed how that part works
var registeredPhysicalIdentiferMap = registeredPhysicalIdentifiers.stream() | ||
.collect(Collectors.toMap(row -> new String(row.getData(), StandardCharsets.UTF_8), | ||
row -> new String(row.getHandle(), StandardCharsets.UTF_8))); | ||
var writableHandles = pidRepository.checkHandlesWritable( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the checkHandlesWritable do? Do we have unwritable handles, I don't get this part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checks PID state. If the PID is set to "ARCHIVED", then the specimen will get a new PID instead of updating an archived PID.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
@@ -97,7 +97,7 @@ public enum FdoProfile { | |||
private final int index; | |||
|
|||
|
|||
private FdoProfile(String attribute, int index) { | |||
FdoProfile(String attribute, int index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way are these no longer private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If you do not specify an access modifier the enum constructor it will be implicitly private."
Slowly going to remove the private constructors when I touch enum files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! Query is a pain but it is a bit faster. Next year start the discussion about the handle server. Just one more question about the no longer private constructions
Re-adds upsert endpoint. New specimens are Postgres-Copied. Updated specimens are inserted with Jooq.
We don't verify media objects/annotations haven't been ingested the way we verify specimens. For media/annotation objects, we rely on the respective processing services to verify they haven't been ingested. It might make sense with media objects (since they'll eventually get DOIs), but for annotations, it probably isn't necessary.