-
Notifications
You must be signed in to change notification settings - Fork 18
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
Query version history #1214
Query version history #1214
Conversation
…PropertiesAndValuesGraphDB.scala.txt. - Import some changes from #1211.
- Return ARK URLs with timestamps.
# Conflicts: # docs/src/paradox/00-release-notes/next.md # webapi/_test_data/all_data/anything-data.ttl # webapi/src/main/scala/org/knora/webapi/store/triplestore/http/HttpTriplestoreConnector.scala
- Fix ARK timestamp formatting again.
- Add knora-base:deletedBy so history can include resource/value deletion.
- Include value creation dates when returning values.
@kilchenmann This PR adds |
@subotic Tobias and I need a little more time to fix a broken test here, no need to review yet. |
@tobiasschweizer I implemented a function in |
@subotic I think this is finally ready for review now. |
@subotic Could you possibly find time to review this PR this week? |
No worries, thanks! |
Yes, sorry. Will do it today. |
@subotic The Travis build is failing because it can't find the command
|
We will update the knora-ui modules to use it with this version of knora. |
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.
LGTM, thanks :-)
) | ||
} | ||
} | ||
} | ||
} ~ path("v2" / "resources" / "history" / Segment) { resourceIriStr: IRI => |
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.
I would personally prefer the following:
/v2/resources/[resourceIRI]/history
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.
This would conflict with the existing route:
/v2/resources/[resourceIRI]/[resourceIRI]
responseSchema = ApiV2WithValueObjects | ||
) | ||
} | ||
} | ||
} ~ path("v2" / "resources" / Segments) { resIris: Seq[String] => |
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.
Here I would prefer:
/v2/resources/[resourceIRI]/version/[timestamp]
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.
and for multiple IRIs:
/v2/resources/version/[timestamp]?Id=iri1,iri2,iri3
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.
I think that the more information is in the URL path the better. I don't like URL parameters very much.
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.
I don't know whether changing this would break Knora-ui, BEOL, etc.
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.
Definitely. The comments are only meant as "food for thought". We can make an issue and do it sometime when @kilchenmann has more time.
we are not the only ones: TypeStrong/typedoc#976 |
we could comment out the documentation building test from travis for the time being. |
Oh, great 🤦🏻♂️
OK. |
getResourcePropertiesAndValuesGraphDB.scala.txt
: Given a resource IRI and a timestamp, retrieve the resource as it was at that time.ResourcesRouteV2
: in the route/v2/resources/IRI
, accept the query parameterversion
(anxsd:dateTimeStamp
, or a Knora ARK URL timestamp).getResourcePropertiesAndValuesGraphDB.scala.txt
: optionally specify a property IRI, and get the resource's values for just that property at the specified time. Needed only internally, for Concurrent updates in API v2 #1079.ValuesResponderV2.verifyValue()
: Use version history to verify value updates (Concurrent updates in API v2 #1079).ReadResourceV2.toJsonLD()
: When returning a resource, include aknora-api:versionArkUrl
containing a timestamp, referring to the version that's being returned.StringFormatter
: Reimplement the formatting and parsing of ARK URL timestamps to make them as short as possible, by removing trailing zeros in fractional seconds (depends on dasch-swiss/ark-resolver@b004034).getResourceVersionHistoryGraphDB.scala.txt
: Given a resource IRI, a start date, and an end date, retrieve a list of all the changes that were made in the resource's values between those dates (no need to return the changes themselves, just when they were made and by whom). Include the creation of the resource, even if it was created with no values.ResourcesRouteV2
: add the route/v2/resources/history/IRI
, to get the version history of the resource's values.knora-api:valueCreationDate
.header.xsl
: Adapt the XSLT transformation for generating TEI/XML headers from BEOL letters to handle the fact that, in RDF/XML, target resources may or may not be nested in link values.A lot of the changes in this PR are in test data, to include
knora-api:versionArkUrl
andknora-api:valueCreationDate
.Resolves #1115.
Resolves #1215.
Fixes #1079.