You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an XML datastream that's been modified, and I want to retrieve previous versions of the datastream content.
Here's what I currently have:
obj.api.getDatastreamDissemination(obj.pid, 'MODS', asOfDateTime=obj.mods.history().versions[0].created).text
That gives me the text of the datastream for whichever version I want - but am I missing an easier way?
Something like this would be nice:
obj.mods.history().versions[0].content
That way I wouldn't need to know how to call getDatastreamDissemination. Also, 'content' could return the actual XmlDatastreamObject, like obj.mods.content does.
The text was updated successfully, but these errors were encountered:
I guess we never needed access to older versions of datastreams frequently enough to create something like this. You're right that there currently is not an easier way to access this content. Your proposal sounds like a nice idea, though.
I think instead of parking the content under history().versions[0] it would make more sense to provide access from the top level of the datastream object. Possibly something like:
obj.mods.versions[0].content
And then datastream properties like checksum, creation date, etc would be accessible at
Forgot to say, I don't expect to have time to work on this anytime soon, but we would certainly welcome a pull request with code, documentation, and tests, and I'd be willing to help talk through implementation details if that is useful.
Otherwise, I'll try to keep it in mind for whenever I do have time to work on enhancing eulfedora.
I have an XML datastream that's been modified, and I want to retrieve previous versions of the datastream content.
Here's what I currently have:
obj.api.getDatastreamDissemination(obj.pid, 'MODS', asOfDateTime=obj.mods.history().versions[0].created).text
That gives me the text of the datastream for whichever version I want - but am I missing an easier way?
Something like this would be nice:
obj.mods.history().versions[0].content
That way I wouldn't need to know how to call getDatastreamDissemination. Also, 'content' could return the actual XmlDatastreamObject, like obj.mods.content does.
The text was updated successfully, but these errors were encountered: