Interface XDOMOfficeDocumentSplitter


  • @Role
    public interface XDOMOfficeDocumentSplitter
    Component responsible for splitting office imports.
    Since:
    2.1M1
    Version:
    $Id: 3034b9a74700517e5602ede57eeeff26e37d8c37 $
    • Method Detail

      • split

        @Deprecated
        default Map<TargetDocumentDescriptor,​XDOMOfficeDocument> split​(XDOMOfficeDocument xdomOfficeDocument,
                                                                             int[] headingLevelsToSplit,
                                                                             String namingCriterionHint,
                                                                             org.xwiki.model.reference.DocumentReference baseDocumentReference)
                                                                      throws OfficeImporterException
        Deprecated.
        Splits an XDOMOfficeDocument into multiple XDOMOfficeDocument instances using the provided heading levels as boundaries. The naming Criterion and the base name determines the target wiki pages for the newly split documents.
        Parameters:
        xdomOfficeDocument - XDOMOfficeDocument to be split
        headingLevelsToSplit - heading levels (1..6) to be used as boundaries. The split process is recursive, if there are multiple heading levels specified, the original document will be split from the highest heading level (lowest value >= 1) first and then the resulting office documents will be re-split from the next highest heading level
        namingCriterionHint - naming criterion to be used when producing target page names for the newly split documents. Currently three schemes are supported:
        • headingNames - Uses the first heading name as target document name
        • mainPageNameAndHeading - Base document name followed by heading name
        • mainPageNameAndNumbering - Base document name followed by index
        baseDocumentReference - base (root) page name to be used when generating target page names for child (newly split) documents
        Returns:
        a map of page descriptors vs. xdom office documents; each page descriptor describes the target wiki page name for the corresponding xdom office document
        Throws:
        OfficeImporterException - if an error occurs while splitting
        Since:
        2.2M1