Repository navigation
Support PATCHing containers - #955
Conversation
RubenVerborgh
left a comment
There was a problem hiding this comment.
Great work!
Minor comment: it seems that several of the ifs in the ConvertingPatcher can be handled with composition of existing converters instead. I'm fine either way, just wanted to make sure that this option was considered.
You mean having a separate patcher for when the input contains no Representation? One issue is that the behaviour is still slightly different for containers and documents: in the case of documents we still want to convert back to a non-quad type. I did go through several iterations of handler structure here and never found something that completely covered everything that I wanted, this is simply the closest I got. So I do feel there might still be improvement possible here. At one point I even made a |
|
Thanks, all good to go! |
Also included is a change to the Patching architecture. Patching is now done by RepresentationPatchers that take a Representation as input.
283802b to
dd2d8a5
Compare
Closes #917 and #384.
Patching has been changed so we now have a
RepresentationPatchHandlerthat calls theResourceStore. It then sends the representation it gets from that to aRepresentationPatcher. We now have 2 patchers in a waterfall handler: the first one handles containers by creating a new representation from the metadata that strips all generated metadata, the second one converts the data to quads (this we already had). Both then send the result to the sparql update patcher.Minor other change:
DataAccessor.canHandleis now only called on documents, not all resources. Reason is that the incoming representation is not relevant for containers since everything gets converted to metadata.