/** * @fileoverview Parses one Project Gutenberg per-book RDF/XML document into the * same normalized {@link Book} shape `GutendexService` produces from the Gutendex * JSON API, so a mirror-served record and a live-served record are interchangeable. * * The field mapping mirrors Gutendex's own RDF reader (`books/utils.py` + * `books/serializers.py` in garethbjohnson/gutendex), which is what populates the * live API this server falls back to. Every ordering, de-duplication, and default * below exists because Gutendex does the same thing — deviating would make the two * paths return different records for the same book. * @module services/catalog-mirror/rdf-book-parser */ import { type Book } from '../gutendex/types.js'; /** * Parse a per-book RDF document into a normalized book record. * * @param xml - Contents of one `pg.rdf` file. * @param id - Gutenberg ID, taken from the archive path rather than the document so a * record can never be filed under an ID the mirror did not ask for. * @returns The normalized book, or null when the document carries no `pgterms:ebook` * element (a placeholder or truncated entry, which is skipped rather than stored). */ export declare function parseBookRdf(xml: string, id: number): Book | null; //# sourceMappingURL=rdf-book-parser.d.ts.map