Example #1
0
class DspaceMetsMods(unittest.TestCase):
    def setUp(self):
        self.registry = MetadataRegistry()
        self.registry.registerReader('mets', dspace_mets_reader)
        self.element = etree.parse(
            os.path.join(os.path.dirname(__file__),
                         'dspace_mets.xml')).getroot()
        self.item = self.registry.readMetadata('mets', self.element)
Example #2
0
 def readMetadata(self, metadata_prefix, element):
     try:
         return MetadataRegistry.readMetadata(self, metadata_prefix,
                                              element)
     except KeyError as key_error:
         try:
             return self.defaultReader(element)
         except AttributeError:
             raise key_error
Example #3
0
 def readMetadata(self, metadata_prefix, element):
     try:
         return MetadataRegistry.readMetadata(self,
                                              metadata_prefix,
                                              element)
     except KeyError as key_error:
         try:
             return self.defaultReader(element)
         except AttributeError:
             raise key_error