Class: Wings::ActiveFedoraConverter::DefaultWork
Overview
A base model class for valkyrie resources that don’t have corresponding ActiveFedora::Base models.
Class Method Summary
collapse
Instance Method Summary
collapse
#private?, #public?, #registered?
#paranoid_permissions
#assign_id
supports_property?
Class Method Details
._to_partial_path ⇒ Object
112
113
114
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 112
def _to_partial_path
"hyrax/#{valkyrie_class.model_name.collection}/#{valkyrie_class.model_name.element}"
end
|
.model_name ⇒ Object
116
117
118
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 116
def model_name(*)
Hyrax::Name.new(valkyrie_class)
end
|
.to_rdf_representation ⇒ Object
Also known as:
inspect
120
121
122
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 120
def to_rdf_representation
"Wings(#{valkyrie_class})" unless valkyrie_class&.to_s&.include?('Wings(')
end
|
Instance Method Details
#enforce_future_date_for_embargo? ⇒ Boolean
Override aggressive Hydra::AccessControls validation
129
130
131
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 129
def enforce_future_date_for_embargo?
false
end
|
#enforce_future_date_for_lease? ⇒ Boolean
Override aggressive Hydra::AccessControls validation
135
136
137
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 135
def enforce_future_date_for_lease?
false
end
|
#file_sets ⇒ Object
139
140
141
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 139
def file_sets
members.select(&:file_set?)
end
|
#indexing_service ⇒ Object
143
144
145
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 143
def indexing_service
Hyrax::Indexers::ResourceIndexer.for(resource: valkyrie_resource)
end
|
#to_global_id ⇒ Object
147
148
149
|
# File 'lib/wings/active_fedora_converter/default_work.rb', line 147
def to_global_id
GlobalID.create(valkyrie_class.new(id: id))
end
|