Module: Wings

Defined in:
lib/wings.rb,
lib/wings/valkyrizable.rb,
lib/wings/orm_converter.rb,
lib/wings/model_registry.rb,
lib/wings/valkyrie/storage.rb,
lib/wings/model_transformer.rb,
lib/wings/valkyrie/persister.rb,
lib/wings/attribute_transformer.rb,
lib/wings/converter_value_mapper.rb,
lib/wings/valkyrie/query_service.rb,
lib/wings/active_fedora_converter.rb,
lib/wings/active_fedora_classifier.rb,
lib/wings/transformer_value_mapper.rb,
lib/wings/valkyrie/metadata_adapter.rb,
lib/wings/valkyrie/resource_factory.rb,
lib/wings/active_fedora_converter/default_work.rb,
lib/wings/active_fedora_converter/nested_resource.rb,
lib/wings/active_fedora_converter/instance_builder.rb,
lib/wings/services/custom_queries/find_ids_by_model.rb,
lib/wings/active_fedora_converter/file_metadata_node.rb,
lib/wings/services/custom_queries/find_file_metadata.rb,
lib/wings/services/custom_queries/find_access_control.rb,
lib/wings/services/custom_queries/find_collections_by_type.rb,
lib/wings/services/custom_queries/find_many_by_alternate_ids.rb

Overview

rubocop:disable Metrics/ClassLength

Defined Under Namespace

Modules: CustomQueries, Valkyrie, Valkyrizable, Works Classes: ActiveFedoraAttributes, ActiveFedoraClassifier, ActiveFedoraConverter, ArrayValue, AttributeTransformer, ConverterValueMapper, EnumerableMapper, FedoraProtectedAttributes, FileAttributeTransformer, FileIds, FileMetadataNode, IdValueMapper, MemberIds, MemberOfCollectionIds, ModelRegistry, ModelTransformer, NestedEmbargoValue, NestedLeaseValue, NestedResourceArrayValue, NestedResourceMapper, NestedResourceValue, NilAttributeValue, OrmConverter, PermissionValue, ReflectionIdValue, ReflectionIdsValue, ReservedAttributeValue, ResourceMapper, StorageError, TransformerValueMapper

Class Method Summary collapse

Class Method Details

.WorkSearchBuilder(work_type) ⇒ Object

Provides a search builder for new valkyrie types that are indexed as their corresponding legacy ActiveFedora classes.

Examples:

builder = Wings::WorkSearchBuilder(Monograph)


75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/wings.rb', line 75

def self.WorkSearchBuilder(work_type) # rubocop:disable Naming/MethodName
  Class.new(Hyrax::WorkSearchBuilder) do
    class_attribute :legacy_work_type, instance_writer: false
    self.legacy_work_type = Wings::ModelRegistry.lookup(work_type)

    def work_types
      [legacy_work_type]
    end

    def self.inspect
      "Wings::WorkSearchBuilder(#{legacy_work_type})"
    end
  end
end