ALTO import: Do not list existing elements
This development was done for a specific project because we had:
- done an IIIF import with Arkindex,
- launched the ALTO import.
We therefore wanted to reuse the imported pages and keep their hierarchy (because ALTO import does not build folder hierarchy).
Currently this piece of code:
- has never been reused,
- is difficult to maintain/understand,
- makes a lot of API requests if the ALTO file has already been partially imported (because it retrieves all the parent/child links)
- duplicates our cache system: we have two different sources (1) the cache and (2) the API to find out what elements exist in Arkindex.
I therefore suggest removing this piece of code.
If, in the future, we have the same problem (wanting to reuse existing pages), I propose a different approach: using our cache system. In fact, the cache is already a system that allows us to reuse existing elements. So I'd propose writing a pre-processing script that would pre-fill the cache.