Skip to content

Commit

Permalink
Merge pull request #911 from MITLibraries/fix-dcterms
Browse files Browse the repository at this point in the history
Fix dcterms.isPartOf in metadata CSV
  • Loading branch information
jazairi authored Feb 17, 2022
2 parents abc21b3 + a75d948 commit 985db73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/archivematica_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def bitstream_checksum_value(file)
# repeatable, take care to increment all file rows but only include details in thesis_pdf
def dc_terms_is_part_of
@thesis.departments.each do |dept|
@csv_hash[:headers] << 'dc.terms.isPartOf'
@csv_hash[:headers] << 'dcterms.isPartOf'

@thesis.files.each_with_index do |file, i|
@csv_hash["f#{i}".to_sym] << thesis_pdf_checker(file,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/files/thesis_1234_archivematica.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
filename,Level_of_DPCommitment,dc.title,dc.date.issued,dc.date.submitted,dc.type,dc.description.abstract,dc.identifier.uri,BitstreamDescription,BitstreamChecksumValue,BitstreamChecksumAlgorithm,dc.publisher,dc.terms.isPartOf,dc.contributor.author,dc.identifier.orcid,dc.contributor.advisor,dc.description.degree,thesis.degree.name,mit.thesis.degree,dc.contributor.department,dc.rights,dc.rights,dc.rights.uri
filename,Level_of_DPCommitment,dc.title,dc.date.issued,dc.date.submitted,dc.type,dc.description.abstract,dc.identifier.uri,BitstreamDescription,BitstreamChecksumValue,BitstreamChecksumAlgorithm,dc.publisher,dcterms.isPartOf,dc.contributor.author,dc.identifier.orcid,dc.contributor.advisor,dc.description.degree,thesis.degree.name,mit.thesis.degree,dc.contributor.department,dc.rights,dc.rights,dc.rights.uri
data/a_pdf.pdf,Level 3,MyString,2017-09,2021-12-25 12:20:00 UTC,Thesis,MyText,"",Thesis PDF,2800ec8c99c60f5b15520beac9939a46,MD5,Massachusetts Institute of Technology,AIC#Course_16_theses,"Yobot, Yo",0001,Addy McAdvisor,MFA,Master of Fine Arts,Bachelor,Massachusetts Institute of Technology. Department of Aeronautics and Astronautics,In Copyright - Educational Use Permitted,Copyright MIT,http://rightsstatements.org/page/InC-EDU/1.0/
data/b_pdf.pdf,"","","","","","","",Signature page,2800ec8c99c60f5b15520beac9939a46,MD5,"","","","","","","","","","","",""
4 changes: 2 additions & 2 deletions test/models/archivematica_metadata_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def publishing_friendly_thesis(thesis)
meta = ArchivematicaMetadata.new(t)
csv = meta.instance_variable_get(:@csv_hash)
assert_equal(csv[:headers],
["filename", "Level_of_DPCommitment", "dc.title", "dc.date.issued", "dc.date.submitted", "dc.type", "dc.description.abstract", "dc.identifier.uri", "BitstreamDescription", "BitstreamChecksumValue", "BitstreamChecksumAlgorithm", "dc.publisher", "dc.terms.isPartOf", "dc.contributor.author", "dc.identifier.orcid", "dc.contributor.advisor", "dc.description.degree", "thesis.degree.name", "mit.thesis.degree", "dc.contributor.department", "dc.rights", "dc.rights", "dc.rights.uri"]
["filename", "Level_of_DPCommitment", "dc.title", "dc.date.issued", "dc.date.submitted", "dc.type", "dc.description.abstract", "dc.identifier.uri", "BitstreamDescription", "BitstreamChecksumValue", "BitstreamChecksumAlgorithm", "dc.publisher", "dcterms.isPartOf", "dc.contributor.author", "dc.identifier.orcid", "dc.contributor.advisor", "dc.description.degree", "thesis.degree.name", "mit.thesis.degree", "dc.contributor.department", "dc.rights", "dc.rights", "dc.rights.uri"]
)
end

Expand Down Expand Up @@ -145,7 +145,7 @@ def publishing_friendly_thesis(thesis)

t = theses(:one)
publishing_friendly_thesis(t)
assert_equal("c38f8ac8cdeb08bc344b6d5b7002458a", ArchivematicaMetadata.new(t).md5)
assert_equal("b4f000886b890d2628f3d7500cecdfd9", ArchivematicaMetadata.new(t).md5)

end
end
Expand Down

0 comments on commit 985db73

Please sign in to comment.