This depends on #89 because NCA will always need to be the place titles are entered, and will need to be the place admins upload MARC XML to avoid the ONI CLI-only approach to management.
Create an API endpoint in ONI to load MARC XMLs
API takes XML as part of the POST
Store XML, named by its LCCN (e.g., sn12345678.xml) in a central location (new setting in ONI?)
Run the title importer management command's code. Not the actual CLI command, just the code.
(Do whatever ./manage.py load_titles /path/to/marc/ does)
This could be messy though. NCA and ONI will both still need their own version of titles - NCA needs to be able to have titles that don't yet exist so publishers can start uploading things before MARC records are created. This means that the two systems will be out of sync at times. Which could be really confusing.
One approach could be to not allow any issues to get metadata entered if the LCCN hasn't been validated. This would ensure nothing tries to be batched up for ONI when it would fail loading.
We could also hold issues and not put them in batches when the LCCN isn't validated, but there's not an easy way in the UI to see that there are issues "stuck" waiting. Having it be something curators see could be useful because it becomes clear there's a large backlog of issues for the given publisher, and somebody has to take action. Of course as we improve the batch management side of things, it's possible we could also make it easier to see that issues are unable to be batched....
This depends on #89 because NCA will always need to be the place titles are entered, and will need to be the place admins upload MARC XML to avoid the ONI CLI-only approach to management.
sn12345678.xml
) in a central location (new setting in ONI?)./manage.py load_titles /path/to/marc/
does)This could be messy though. NCA and ONI will both still need their own version of titles - NCA needs to be able to have titles that don't yet exist so publishers can start uploading things before MARC records are created. This means that the two systems will be out of sync at times. Which could be really confusing.
One approach could be to not allow any issues to get metadata entered if the LCCN hasn't been validated. This would ensure nothing tries to be batched up for ONI when it would fail loading.
We could also hold issues and not put them in batches when the LCCN isn't validated, but there's not an easy way in the UI to see that there are issues "stuck" waiting. Having it be something curators see could be useful because it becomes clear there's a large backlog of issues for the given publisher, and somebody has to take action. Of course as we improve the batch management side of things, it's possible we could also make it easier to see that issues are unable to be batched....