Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wings: Round trip custom files in filesets #4203

Closed
elrayle opened this issue Jan 23, 2020 · 0 comments · Fixed by #4225
Closed

Wings: Round trip custom files in filesets #4203

elrayle opened this issue Jan 23, 2020 · 0 comments · Fixed by #4225
Assignees

Comments

@elrayle
Copy link
Contributor

elrayle commented Jan 23, 2020

Descriptive summary

Support fileset files with custom associations (i.e. associations other than original_file, extracted_text, and thumbnail). The filesets with these files should be able to round trip from ActiveFedora to Valkyrie Resource and back.

Rationale

Maintain support for custom associations between a fileset and files.

Expected behavior

Whether a fileset is created directly as a Valkyrie::Resource or an AF object, it should allow for adding files with relationships other than original file, extracted text and thumbnail, such as, http://pcdm.org/use#remastered.

Actual behavior

Not sure.

Code that may be impacted by this support

app/models/hyrax/file_metadata.rb #1193

file.use = RDF::URI.new('http://pcdm.org/use#remastered')
file_metadata = Hyrax::FileMetadata.for(file: fixture)
file_metadata.use # should return <RDF::URI 'http://pcdm.org/use#remastered'>

app/wings/hydra/works/service/services/add_file_to_file_set.rb

Should allow type: to be passed in as RDF::URI.new('http://pcdm.org/use#remastered')

Tested in spec/wings/hydra/works/services/add_file_to_file_set_spec.rb at context 'when :use is NOT the name of an association type'

app/wings/active_fedora_converter.rb #convert_files

#convert_files currently only supports conversion of files with use original file, extracted text, and thumbnail. Needs to be expanded to support all file associations. The use is stored in the FileMetadata resource in the use attribute. The FileSet has the list of files.

app/actors/hyrax/actors/file_actor.rb #normalize_relation_for_valkyrie

Appears to only handle original_file, extracted_text, and thumbnail_file.

The relation tests in file_actor_spec.rb when processing using valkyrie are marked pending 'implementation of Wings::Valkyrie::Persister #save_file_metadata'. I'm not sure that still applies.

The first test starting at context 'relation' (~ln 149) uses relation http://pcdm.org/use#remastered which makes it a good test of this functionality.

Related work

Issue #4060 - added support for standard uses of original_file, extracted_text, and thumbnail (PR #4055)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant