Skip to content

Commit

Permalink
Set valkyrie models as default in Hyrax.config (#6715)
Browse files Browse the repository at this point in the history
file_set_model is already the valkyrie model by default.
.dassie continues to use the AF models. Existing hyrax applications continuing to use AF will need to set a similar config.
  • Loading branch information
dlpierce committed Feb 22, 2024
1 parent e4265da commit 0be827b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .dassie/config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
# config.collection_model = 'Hyrax::PcdmCollection' # collection without basic metadata
# config.collection_model = 'CollectionResource' # collection with basic metadata
# config.admin_set_model = 'Hyrax::AdministrativeSet'

# dassie needs legacy AF models
config.collection_model = '::Collection'
config.admin_set_model = 'AdminSet'
config.file_set_model = '::FileSet'
end

Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
Expand Down
10 changes: 5 additions & 5 deletions lib/hyrax/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module Hyrax
#
# == Valkyrie
#
# *Experimental:* Options for toggling Hyrax's experimental "Wings" valkyrie
# Options for toggling Hyrax's "Wings" valkyrie
# adapter and configuring valkyrie.
#
# @see Hyrax.config
Expand Down Expand Up @@ -617,14 +617,14 @@ def index_adapter=(adapter)
end

##
# @return [Boolean] whether to use the experimental valkyrie index
# @return [Boolean] whether to use the valkyrie index
def query_index_from_valkyrie
@query_index_from_valkyrie ||= false
end
attr_writer :query_index_from_valkyrie

##
# @return [Boolean] whether to use experimental valkyrie storage features
# @return [Boolean] whether to use valkyrie storage features
def use_valkyrie?
return @use_valkyrie unless @use_valkyrie.nil?
return true if disable_wings # always return true if wings is disabled
Expand Down Expand Up @@ -860,7 +860,7 @@ def collection_type_index_field
# @return [#constantize] a string representation of the collection
# model
def collection_model
@collection_model ||= '::Collection'
@collection_model ||= 'Hyrax::PcdmCollection'
end

##
Expand All @@ -874,7 +874,7 @@ def collection_class
# @return [#constantize] a string representation of the admin set
# model
def admin_set_model
@admin_set_model ||= 'AdminSet'
@admin_set_model ||= 'Hyrax::AdministrativeSet'
end

##
Expand Down

0 comments on commit 0be827b

Please sign in to comment.