Add PID support, with lots of underlying changes#613
Open
mikesname wants to merge 21 commits into
Open
Conversation
fb4d124 to
07942f7
Compare
d1f4b02 to
d4929e0
Compare
Add initialisation properties, which start w/ a double underscore and are later serialised to the metadata section of the Bundle. Add __pid as a mandatory property to docs and repositories (and later other entities). PIDs here will formed the assigned name part of ARKs. Various refactoring, especially to the BundleValidator, which has to now validate for creation and separate for update.
Also a new ark() function to get the ARK of a node.
This will encapsulate migrating a doc unit from one location to another, including its PID, access controls, user-generated content etc
d4929e0 to
29c3e61
Compare
Probability of collision is approx. 0.014% per 10 million PIDs.
Also ensure permissions are checked for various batch methods, since these are no longer admin-only.
This is more complicated that might be expected because Links are created in a bunch of places other than the WS and for that it is required to add pre-creation callbacks in which the PID can be added, which required refactoring how e.g. the LinkResolver (for EAD/EAC/CSV) is constructed.
29c3e61 to
ba97604
Compare
In the case of integrity errors from identifier generators with composite keys, no longer give a misleading response.
This file contains hidden or 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
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.
Rather than just being another string property, the concept of initialisation properties has been added and these cannot be changed via regular updates. The initialisation property
__pidis mandatory for certain items, but not generated automatically in order to make it testable. In most cases the PID is provided at the web service layer, and as a pre-creation callback in various importer tools (XML, CSV, JSON etc).Various related changes:
EadSyncclass to aMigratorthat can handle moving item metadata (and its PID) to another item