Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

BookOnixMessage

Namespace OfficeIMO.Workflows
Assembly OfficeIMO.Workflows
Modifiers sealed

A schema-validated ONIX 3.1 complete-record, block-update or deletion message derived from complete export results.

Inheritance

  • Object
  • BookOnixMessage

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public static BookOnixMessage Create(IReadOnlyList<BookOnixExportResult> products, XmlSchemaSet schemas, CancellationToken cancellationToken = default) #
Returns: BookOnixMessage

Composes 1–1000 unmodified ExportOnix results with the same serialized header (sender and UTC timestamp). Rejects repeated record references or ISBNs, altered ONIX or EPUB bytes, and combined XML over 16 MiB. The supplied compiled schema validates the complete message. No input is changed and no delivery occurs. Callers own schema provenance and must not mutate inputs or schemas during this operation.

Parameters

products System.Collections.Generic.IReadOnlyList{OfficeIMO.Workflows.BookOnixExportResult} requiredposition: 0
schemas System.Xml.Schema.XmlSchemaSet requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public static BookOnixMessage CreateBlockUpdates(IReadOnlyList<BookOnixBlockUpdate> updates, XmlSchemaSet schemas, CancellationToken cancellationToken = default) #
Returns: BookOnixMessage

Composes 1–1000 explicit block updates (notification 04). Selected blocks are copied whole; unselected blocks are omitted, and only ClearBlocks emits empty blocks. All source headers must match. ProductSupply block selection copies every unnamed source repeat. Named markets use explicit reference selections. Missing selected blocks or markets fail; market removals are explicit reference-only supply declarations. Retains the source EPUB association and the same integrity, schema, cancellation and size gates as Create. Does not compare recipient state or transmit instructions. Do not mutate inputs or schemas during composition.

Parameters

updates System.Collections.Generic.IReadOnlyList{OfficeIMO.Workflows.BookOnixBlockUpdate} requiredposition: 0
schemas System.Xml.Schema.XmlSchemaSet requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public static BookOnixMessage CreateDeletions(IReadOnlyList<BookOnixDeletion> deletions, XmlSchemaSet schemas, CancellationToken cancellationToken = default) #
Returns: BookOnixMessage

Composes explicit metadata-record deletions (notification 05), keeping record references and product identifiers. Reasons are optional plain text; product status changes must instead use complete records or block updates. The source headers, exact EPUB provenance, integrity and size gates remain in force. No deletion is transmitted.

Parameters

deletions System.Collections.Generic.IReadOnlyList{OfficeIMO.Workflows.BookOnixDeletion} requiredposition: 0
schemas System.Xml.Schema.XmlSchemaSet requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2

Properties

public Byte[] Bytes { get; } #

UTF-8 ONIX XML, at most 16 MiB, with products in the supplied order.

public BookOnixMessageKind Kind { get; } #

The explicit operation encoded by this message.

public IReadOnlyList<BookOnixExportResult> Products { get; } #

Original complete export results, retaining each exact EPUB, hash, writer report and import diagnostics. For updates or deletions these are provenance, not copies of the partial records in Bytes. The collection is snapshotted, but the results' byte arrays remain caller-owned and mutable. Integrity is checked during composition; later edits do not update this message.