Class VolumeProvider
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.VolumeProvider
-
public class VolumeProvider extends Object
Given a list of
BlockSequences, producesVolumeobjects 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 ofBlockSequences, of which the first one has a hard volume break (break-before="volume"). For every volume group aSheetDataSourceis then created, which is wrapped in aSheetGroup. All groups are managed in aSheetGroupManager.SheetDataSources 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-priorityof the last sheet, and whether theisBreakableconstraint of the last sheet is violated.Pre- and post-content is added to every volume based on the provided
VolumeTemplates.One
PageCounteris created for the body of the whole document, and one for every pre- or post-content of every volume.