heliport.core.pid_registration package
Submodules
heliport.core.pid_registration.handle_net module
PID registration interface for handle.net servers.
- class heliport.core.pid_registration.handle_net.HandleNetRegistry
Bases:
objectClass for PID registration on Handle.Net servers.
- full_url(identifier: str) str
Return the full URL for
identifier.identifieris assumed to be valid and containing the server prefix. The URL is simply constructed and returned with no request to the server being sent.
- class heliport.core.pid_registration.handle_net.HandleServerSession
Bases:
SessionCustom
requests.Sessionsubclass for handle server interaction.- request(method, url, **kwargs) Response
Handle request, preventing sending the certificate to the wrong server.
- heliport.core.pid_registration.handle_net.register_handle(digital_object: DigitalObject) str | None
Mint a new handle for the given digital object.
The newly minted handle is returned as a full URL, or
Noneif anything goes wrong. If the digital object already has a handle, this handle is returned and no new handle is minted. If the digital object has no primary key (i.e. it was not saved in the database), or no category,Noneis returned.The handle is also stored in
DigitalObjectIdentifierusing thehdlscheme.
heliport.core.pid_registration.heliport_id module
Fallback “PID” registration interface using HELIPORT URLs.
- heliport.core.pid_registration.heliport_id.register_heliport_id(digital_object: DigitalObject) str | None
Create a new HELIPORT ID for the given digital object.
heliport.core.pid_registration.signal_handlers module
Signal handlers for the app.
- heliport.core.pid_registration.signal_handlers.register_pids(sender, instance: DigitalObject, created: bool, using, update_fields, **kwargs)
Post-save handler for digital object PID registration.
If the saved object was newly created, does not yet have any persistent identifier, persistent identifiers are registered for the digital object.
A “HELIPORT ID” is always registered for the digital object. If handle registration is enabled, a handle is registered for the digital object as well.
heliport.core.pid_registration.tests module
Tests for the heliport.core.pid_registration app.
- class heliport.core.pid_registration.tests.HandleNetTest(methodName='runTest')
Bases:
TestCaseTests for
handle_netmodule.- test_handle_server_session()
Disallow request to wrong server.
- test_mint_identifier()
Registration of a new handle.
- test_register_existing_handle()
Trying to register a handle that already exists.
Module contents
PID registration for digital objects.