Commit 798d83ea authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Remove obsolete code in foxml module

parent fc5c41b6
......@@ -4,21 +4,6 @@ from hashlib import md5
from urllib.parse import quote
def parse_into_fedora_object(file):
reader = FoxmlReader(file)
return FedoraObject(
reader.get_recordset_id(),
reader.get_document_id(),
reader.get_locator(),
# reader.get_object_type(),
reader.get_thumbnail_datastream_original_filename(),
reader.get_thumbnail_datastream_file(),
reader.get_accesscopy_datastream_original_filename(),
reader.get_accesscopy_datastream_file())
def _get_element_text(start_element, xpath_expression):
el = start_element.find(xpath_expression, FoxmlReader.NAMESPACES)
if el is not None and el.text is not None:
......@@ -141,23 +126,3 @@ class FoxmlReader:
return _calculate_data_stream_path(thumbnail_ref)
else:
return None
# class FoxmlParsingError(Exception):
# pass
class FedoraObject:
# def __init__(self, record_set, document_id, locator, object_type, thumbnail_datastream_original_filename,
# thumbnail_datastream_file, accesscopy_datastream_original_filename, accesscopy_datastream_file):
def __init__(self, record_set, document_id, locator, thumbnail_datastream_original_filename,
thumbnail_datastream_file, accesscopy_datastream_original_filename, accesscopy_datastream_file):
self.record_set = record_set
self.document_id = document_id
self.locator = locator
# self.object_type = object_type
self.thumbnail_original_filename = thumbnail_datastream_original_filename
self.thumbnail_datastream_file = thumbnail_datastream_file
self.accesscopy_original_filename = accesscopy_datastream_original_filename
self.accesscopy_datastream_file = accesscopy_datastream_file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment