Skip to content

Add PID support, with lots of underlying changes#613

Open
mikesname wants to merge 21 commits into
EHRI:mainfrom
mikesname:feature/pid_support
Open

Add PID support, with lots of underlying changes#613
mikesname wants to merge 21 commits into
EHRI:mainfrom
mikesname:feature/pid_support

Conversation

@mikesname

@mikesname mikesname commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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 __pid is 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:

  • extend core API to support lookups by PID
  • refactored validation
  • extracted parts of EadSync class to a Migrator that can handle moving item metadata (and its PID) to another item
  • added various Cypher and GraphQL support functions
  • updated EAG schema version

@mikesname mikesname force-pushed the feature/pid_support branch from fb4d124 to 07942f7 Compare June 17, 2026 10:21
@mikesname mikesname force-pushed the feature/pid_support branch 2 times, most recently from d1f4b02 to d4929e0 Compare June 24, 2026 14:44
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
@mikesname mikesname force-pushed the feature/pid_support branch from d4929e0 to 29c3e61 Compare June 24, 2026 15:57
mikesname added 13 commits June 24, 2026 17:03
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.
@mikesname mikesname force-pushed the feature/pid_support branch from 29c3e61 to ba97604 Compare June 24, 2026 16:03
In the case of integrity errors from identifier generators with
composite keys, no longer give a misleading response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant