Class HeadingLevelSplittingCriterion

    • Constructor Detail

      • HeadingLevelSplittingCriterion

        public HeadingLevelSplittingCriterion​(int[] headingLevels)
        Parameters:
        headingLevels - sorted array of heading levels (ascending)
    • Method Detail

      • shouldIterate

        public boolean shouldIterate​(org.xwiki.rendering.block.Block block,
                                     int depth)
        Description copied from interface: SplittingCriterion
        Limits the recursive tree traversal performed by the DocumentSplitter.
        Specified by:
        shouldIterate in interface SplittingCriterion
        Parameters:
        block - current Block being traversed by the document splitter.
        depth - depth of this block w.r.t root of the main xdom being split.
        Returns:
        true if the sub-tree rooted at this block should be traversed further.
      • shouldSplit

        public boolean shouldSplit​(org.xwiki.rendering.block.Block block,
                                   int depth)
        Description copied from interface: SplittingCriterion
        Indicates if the sub-tree rooted at the given block should be split into a separate document.
        Specified by:
        shouldSplit in interface SplittingCriterion
        Parameters:
        block - current Block being traversed by the document splitter.
        depth - depth of this block w.r.t root of the main xdom being split.
        Returns:
        true if the sub-tree rooted at this block should be split into a separate document.