def serial(skip_indexing): """Create relations for migrated serials.""" with commit(): link_documents_and_serials() if not skip_indexing: reindex_pidtype("docid") reindex_pidtype("serid")
def journal( sources, skip_indexing, rectype="journal", ): """Migrate journals from xml dump file.""" click.echo("Migrating {}s...".format(rectype)) import_series_from_dump(sources, rectype=rectype) if not skip_indexing: reindex_pidtype("serid")
def documents(sources, source_type, include, skip_indexing): """Migrate documents from CDS legacy.""" import_documents_from_dump( sources=sources, source_type=source_type, eager=True, include=include, ) # We don't get the record back from _loadrecord so re-index all documents if not skip_indexing: reindex_pidtype("docid")
def series(skip_indexing): """Create relations for migrated series.""" migrate_series_relations() if not skip_indexing: reindex_pidtype("serid")
def loan_requests(source): """Migrate loan_requests from CDS legacy.""" import_loans_from_json(source) reindex_pidtype("loanid")
def items(sources, skip_indexing): """Migrate documents from CDS legacy.""" for idx, source in enumerate(sources, 1): import_items_from_json(source) if not skip_indexing: reindex_pidtype("pitmid")
def series(skip_indexing, fail_on_exceptions): """Create relations for migrated series.""" migrate_series_relations(raise_exceptions=fail_on_exceptions) if not skip_indexing: reindex_pidtype("serid")