org.xwiki.officeimporter.splitter
Interface XDOMOfficeDocumentSplitter

All Known Implementing Classes:
DefaultXDOMOfficeDocumentSplitter

@Role
public interface XDOMOfficeDocumentSplitter

Component responsible for splitting office imports.

Since:
2.1M1

Method Summary
 Map<TargetDocumentDescriptor,XDOMOfficeDocument> split(XDOMOfficeDocument xdomOfficeDocument, int[] headingLevelsToSplit, String namingCriterionHint, DocumentReference baseDocumentReference)
          Splits an XDOMOfficeDocument into multiple XDOMOfficeDocument instances using the provided heading levels as boundaries.
 

Method Detail

split

Map<TargetDocumentDescriptor,XDOMOfficeDocument> split(XDOMOfficeDocument xdomOfficeDocument,
                                                       int[] headingLevelsToSplit,
                                                       String namingCriterionHint,
                                                       DocumentReference baseDocumentReference)
                                                       throws OfficeImporterException
Splits an XDOMOfficeDocument into multiple XDOMOfficeDocument instances using the provided heading levels as boundaries. The namingCriterion & the baseName 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