Refactor Valkyrie indexer API (to match forms) #6441
Merged
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.
Note: Because there are some file renames which don’t persist across the full diff, I recommend reviewing each commit in sequence.
This is a kind of heavy refactor of the Valkyrie indexer classes to match the API used for forms. This means :—
Using configurable classes, like
Hyrax.config.pcdm_collection_indexer
, instead of hardcoded ones.Renaming all of the classes to follow a pattern and be namespaced to
Hyrax::Indexers
:—Hyrax::ValkyrieIndexer
🔜Hyrax::Indexers::ResourceIndexer
.Note: This is a somewhat less‐basic base class, as it includes
Hyrax::ResourceIndexer
. If we still wantHyrax::ValkyrieIndexer
as a base class which does not utilizeHyrax::ResourceIndexer
, that’s probably an option.Hyrax::PcdmCollectionIndexer
🔜Hyrax::Indexers::PcdmCollectionIndexer
.Note: This class has already been renamed once in the past (it was originally
Hyrax::ValkyrieCollectionIndexer
; see 7ca32a5).Hyrax::ValkyrieFileSetIndexer
🔜Hyrax::Indexers::FileSetIndexer
.Hyrax::ValkyrieWorkIndexer
🔜Hyrax::Indexers::PcdmObjectIndexer
.The old aliases are supported with deprecation warnings.
Implementing
Hyrax::Indexers::ResourceIndexer()
andHyrax::Indexers::PcdmObjectIndexer()
to matchHyrax::Forms::ResourceForm()
andHyrax::Forms::PcdmObjectForm()
.