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
feat(api-v2): Specify custom IRIs when creating resources/values #1646
Conversation
…s + test + test data
…RI and assign it to value + test
@benjamingeer looking at the code I see that: when a resource with multiple values is being created, the In my opinion, custom |
Yes, good analysis! |
…m IRI, value IRIs, and value UUIDs.
The following refactoring step
will happen in DSP-355 |
@benjamingeer eventually the tests passed! |
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.
After thinking about this some more, I think we actually need to accept a custom value creation date for each value even when creating a new resource. Imagine this scenario:
- On a test server, someone creates a new resource
- Then they add a value.
- Maybe they update the value several times.
- They cite the ARK URL for one of the updated versions of the value.
- They then transfer the whole project to the live server.
The ARK URL should still work, which means that the updated value needs to have its own value creation date, not the value creation date of the resource.
Sorry I didn't think this through well enough before.
...pi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala
Show resolved
Hide resolved
webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
Show resolved
Hide resolved
…ing added to docs
In that case, if no custom creation date is provided for the value of a new resource, the creation date of the resource should be assigned to the value, right? |
@benjamingeer last commit contains the implementation of "create resources with values that have custom creation dates". Can you please tell me your opinion? |
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.
last commit contains the implementation of "create resources with values that have custom creation dates". Can you please tell me your opinion?
Looks good to me. I'm just talking to Ivan about some questions I have... I think we may need more than custom IRIs to make this whole thing work...
webapi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
Show resolved
Hide resolved
Yes. I just talked to Ivan about some additional complexity in copying a repository. The result is that there's a new user story for additional functionality (https://dasch.myjetbrains.com/youtrack/issue/DSP-398). This would also require being able to specify:
Do you want to do those in this PR? |
No, I prefer to do it in a separate PR. |
OK then I think this one is good to merge! You can approve it yourself. :) |
Thanks for reviewing it! |
User story: https://dasch.myjetbrains.com/youtrack/issue/DSP-159
CreateResourceRequestV2.fromJsonLD
accept:CreateValueRequestV2.fromJsonLD
accept:ResourcesResponderV2
andValuesResponderV2
use this information.