Skip to content

Commit

Permalink
Bug fix for files on compound objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
markpbaggett committed Sep 19, 2024
1 parent a9e7d64 commit 380d3bc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "utk-exodus"
version = "0.2.2"
version = "0.2.3"
description = "A tool for building import sheets from UTK legacy systems"
authors = ["Mark Baggett <[email protected]>"]
readme = "README.md"
Expand Down
13 changes: 13 additions & 0 deletions utk_exodus/finder/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ def find_file_types(self, dsid, preserve_and_obj):
return self.__get_rdf_types_for_file_on_a_pdf_work(dsid, preserve_and_obj)
elif self.parent_type == "Page":
return self.__get_rdf_types_for_file_on_a_pdf_work(dsid, preserve_and_obj)
elif self.parent_type == "CompoundObject":
return self.__get_rdf_types_for_file_on_a_compound_object(dsid)
else:
raise Exception(f"Parent type unknown: {self.parent_type}")

Expand Down Expand Up @@ -361,6 +363,17 @@ def __get_rdf_types_for_file_on_a_book(dsid, preserve_and_obj):
else:
return "http://pcdm.org/use#OriginalFile"

@staticmethod
def __get_rdf_types_for_file_on_a_compound_object(dsid):
if dsid == "MODS":
return "http://pcdm.org/file-format-types#Markup"
elif dsid == "AIP":
return "http://pcdm.org/use#PreservationFile"
elif dsid == "DIP":
return "http://pcdm.org/use#IntermediateFile"
else:
return "http://pcdm.org/use#OriginalFile"


if __name__ == "__main__":
import argparse
Expand Down

0 comments on commit 380d3bc

Please sign in to comment.