Class VolumeProvider


  • public class VolumeProvider
    extends Object

    Given a list of BlockSequences, produces Volume objects one by one. The volumes are obtained through a "iterator" interface.

    The input is a list of BlockSequences, which are first converted to a sequence of "volume groups", where every group is a list of BlockSequences, of which the first one has a hard volume break (break-before="volume"). For every volume group a SheetDataSource is then created, which is wrapped in a SheetGroup. All groups are managed in a SheetGroupManager. SheetDataSources that do not fit in a volume are broken, using SplitPointHandler. The cost function takes into account how much the total size of a volume deviates from the target size, the volume-break-priority of the last sheet, and whether the isBreakable constraint of the last sheet is violated.

    Pre- and post-content is added to every volume based on the provided VolumeTemplates.

    One PageCounter is created for the body of the whole document, and one for every pre- or post-content of every volume.