public class HeadingLevelSplittingCriterion extends Object implements SplittingCriterion
SplittingCriterion based on the heading levels present in an xwiki document.| Constructor and Description |
|---|
HeadingLevelSplittingCriterion(int[] headingLevels)
Constructs a new
HeadingLevelSplittingCriterion. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldIterate(org.xwiki.rendering.block.Block block,
int depth)
Limits the recursive tree traversal performed by the
DocumentSplitter. |
boolean |
shouldSplit(org.xwiki.rendering.block.Block block,
int depth)
Indicates if the sub-tree rooted at the given block should be split into a separate document.
|
public HeadingLevelSplittingCriterion(int[] headingLevels)
HeadingLevelSplittingCriterion.headingLevels - sorted array of heading levels (ascending)public boolean shouldIterate(org.xwiki.rendering.block.Block block,
int depth)
SplittingCriterionDocumentSplitter.shouldIterate in interface SplittingCriterionblock - current Block being traversed by the document splitter.depth - depth of this block w.r.t root of the main xdom being split.public boolean shouldSplit(org.xwiki.rendering.block.Block block,
int depth)
SplittingCriterionshouldSplit in interface SplittingCriterionblock - current Block being traversed by the document splitter.depth - depth of this block w.r.t root of the main xdom being split.Copyright © 2004–2022 XWiki. All rights reserved.