AddFileToFileSet is supposed to be able to process the use the file is playing in the fileset as either a symbol or a URI. But the code in the two methods that create the file through ActiveFedora are not equivalent. The find_or_create_file_for_rdf_uri method fails to create the original_file association which is needed to be able to reference the file from the fileset using the_file_set.original_file.
Expected behavior
Whether calling AddToFileSet with type as URI or symbol, it is expected that after the add, there will be an association method that can be used to access the file in the fileset.
the_file_set.original_file # is defined and returns the File
Actual behavior
the_file_set.original_file # raises method not found for original_file
Descriptive summary
AddFileToFileSet is supposed to be able to process the use the file is playing in the fileset as either a symbol or a URI. But the code in the two methods that create the file through ActiveFedora are not equivalent. The
find_or_create_file_for_rdf_uri
method fails to create theoriginal_file
association which is needed to be able to reference the file from the fileset usingthe_file_set.original_file
.Expected behavior
Whether calling AddToFileSet with type as URI or symbol, it is expected that after the add, there will be an association method that can be used to access the file in the fileset.
Actual behavior
find_or_create_file_for_symbol correctly creates original_file association
find_or_create_file_for_rdf_uri fails to create original_file association
Steps to reproduce the behavior