-
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
Hardcode fdo profiles #83
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…es' into feature/hardcode-object-type-names
samleeflang
reviewed
May 21, 2024
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.
Looks good, no big things, just a couple of questions.
src/main/java/eu/dissco/core/handlemanager/domain/fdo/vocabulary/specimen/TopicDiscipline.java
Outdated
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/domain/fdo/vocabulary/specimen/TopicDiscipline.java
Show resolved
Hide resolved
src/main/java/eu/dissco/core/handlemanager/service/FdoRecordService.java
Outdated
Show resolved
Hide resolved
|
samleeflang
approved these changes
May 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes! Need to see following PRs:
Purpose of this PR: to hardcode the names of the digital object types (PIDs) so we don't have to resolve them. And then some refactoring
Properties file or enum?
Originally, we discussed putting these type names and pids in a properties file that could be overwritten. Instead, I put the fields in a hardcoded enum because:
application.properties
might not be a good idea. if these object types' names or pids change, we shouldn't have the old values in the code at all.Why do some of the digital object names have capitals or spaces?
Yeah that's the name of the object when you resolve it, so I went with that. It's not a consistent pattern, but it seems to be unchangeable. Hopefully we can fix this when we move to production epic.
Changes to the request objects
Here's what the requests used to look like:
It's redundant to have "type" on the higher level, then "digitalObjectType" in the request attributes. Now "type" will only accept the PID of the request type, and the field "digitalObjectType" is no longer accepted in the attribute body.
I also removed the "fdoProfile" attribute from the request. This is because the profile is determined by the Type. The processing services/other clients shouldn't need to provide this redundant info. Currently, the same PID is used for profiles and Types. We don't have separate pids for these yet. I will make separate entries in the type registry after we discuss with ePIC.
Obviously, these are breaking changes, and the processors are updated accordingly.
Changed request now looks like:
Other changes
Refactored the tests a bit.
"referentType" in DOIs and its inheritors is still poorly defined. The definition I have right now is:
Anyway, there's no mapping for that term, so we just use digitalObjectName right now.