Class VolumeProvider
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.VolumeProvider
-
public class VolumeProvider extends Object
Given a list of
BlockSequence
s, producesVolume
objects one by one. The volumes are obtained through a"iterator" interface
.The input is a list of
BlockSequence
s, which are first converted to a sequence of "volume groups", where every group is a list ofBlockSequence
s, of which the first one has a hard volume break (break-before="volume"
). For every volume group aSheetDataSource
is then created, which is wrapped in aSheetGroup
. All groups are managed in aSheetGroupManager
.SheetDataSource
s that do not fit in a volume are broken, usingSplitPointHandler
. The cost function takes into account how much the total size of a volume deviates from the target size, thevolume-break-priority
of the last sheet, and whether theisBreakable
constraint of the last sheet is violated.Pre- and post-content is added to every volume based on the provided
VolumeTemplate
s.One
PageCounter
is created for the body of the whole document, and one for every pre- or post-content of every volume.