def test_fetch(url, record_id, fmt): registry = importformats.create_metadata_registry() client = oaipmh.client.Client(url, registry) record = client.getRecord(identifier=record_id, metadataPrefix=fmt) return record
def test_list(url): registry = importformats.create_metadata_registry() client = oaipmh.client.Client(url, registry) return (header.identifier() for header in client.listIdentifiers(metadataPrefix='oai_dc'))
def metadata_registry(self, config, harvest_job): harvest_type = config.get('type', 'default') return importformats.create_metadata_registry(harvest_type, harvest_job.source.url)