BookMetadata class final
Format-agnostic book metadata extracted from any supported book file.
Every format module maps its native metadata into this common shape. Fields the source format
does not carry stay null / empty.
Constructors
-
BookMetadata({required BookFormat format, String? authorSort, List<
String> authors = const <String>[], String? bookProducer, BookCover? cover, String? description, Map<String, String> identifiers = const <String, String>{}, String? isbn, List<String> languages = const <String>[], DateTime? publishedAt, String? publisher, String? rights, String? series, double? seriesIndex, List<String> subjects = const <String>[], String? title, String? titleSort}) -
Creates a BookMetadata.
const
Properties
-
Author names, in display order.
final
-
Author string used for sorting (e.g.
Last, First), when the source format carries one explicitly.final - bookProducer → String?
-
Tool or person that produced the file, when the source records it.
final
- cover → BookCover?
-
The book cover, when one could be located.
final
- description → String?
-
Description / annotation / summary.
final
- effectiveAuthorSort → String?
-
The author sort key to sort by: authorSort read from the file when present, otherwise
computed from authors using the canonical author sort rules.
no setter
- effectiveTitleSort → String?
-
The title sort key to use: titleSort when present; otherwise, it is computed from title by
moving a leading article to the end and selecting the article list from languages. Returns
null when no title is available.
no setter
- format → BookFormat
-
The format the metadata was extracted from.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
identifiers
→ Map<
String, String> -
Additional identifiers keyed by scheme (e.g.
asin,uuid).final - isbn → String?
-
ISBN, when available.
final
-
languages
→ List<
String> -
ISO language codes (e.g.
en,pt-BR).final - publishedAt → DateTime?
-
Publication date, when parseable.
final
- publisher → String?
-
Publisher name, when available.
final
- rights → String?
-
Copyright / rights statement.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- series → String?
-
Series / collection name the book belongs to.
final
- seriesIndex → double?
-
Position of the book inside its series (1-based, may be a fraction such as
2.5for short stories between volumes).final -
subjects
→ List<
String> -
Subjects / genres / tags.
final
- title → String?
-
Book title, when available.
final
- titleSort → String?
-
Title string used for sorting (title without leading articles), when the source format carries
one explicitly.
final
Methods
-
copyWith(
{BookFormat? format, String? title, String? titleSort, String? authorSort, String? bookProducer, List< String> ? authors, List<String> ? languages, String? publisher, String? description, String? isbn, List<String> ? subjects, DateTime? publishedAt, String? rights, String? series, double? seriesIndex, Map<String, String> ? identifiers, BookCover? cover}) → BookMetadata - Returns a copy with the provided fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited