Class OfficeDocumentSplitterParameters
- java.lang.Object
-
- org.xwiki.officeimporter.splitter.OfficeDocumentSplitterParameters
-
@Unstable public class OfficeDocumentSplitterParameters extends Object
Parameters that control how an office document is split.- Since:
- 14.10.2, 15.0RC1
- Version:
- $Id: a8c93e97b73453ae1c02368dfb1d75a7892b76aa $
-
-
Constructor Summary
Constructors Constructor Description OfficeDocumentSplitterParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xwiki.model.reference.DocumentReference
getBaseDocumentReference()
int[]
getHeadingLevelsToSplit()
String
getNamingCriterionHint()
boolean
isUseTerminalPages()
void
setBaseDocumentReference(org.xwiki.model.reference.DocumentReference baseDocumentReference)
Set the base (root) document reference to be used when generating target document references for child (newly split) documents.void
setHeadingLevelsToSplit(int[] headingLevelsToSplit)
Set the heading levels (1..6) to be used as boundaries.void
setNamingCriterionHint(String namingCriterionHint)
Set the naming criterion to be used when producing target page names for the newly split documents.void
setUseTerminalPages(boolean useTerminalPages)
Set whether to use terminal pages or nested pages for storing the newly split documents.
-
-
-
Method Detail
-
getHeadingLevelsToSplit
public int[] getHeadingLevelsToSplit()
- Returns:
- the heading levels (1..6) used as boundaries
- See Also:
setHeadingLevelsToSplit(int[])
-
setHeadingLevelsToSplit
public void setHeadingLevelsToSplit(int[] headingLevelsToSplit)
Set the 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.- Parameters:
headingLevelsToSplit
- the heading levels (1..6) to use as boundaries
-
getNamingCriterionHint
public String getNamingCriterionHint()
- Returns:
- the naming criterion used when producing target (child) pages names
- See Also:
setNamingCriterionHint(String)
-
setNamingCriterionHint
public void setNamingCriterionHint(String namingCriterionHint)
Set the 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
- Parameters:
namingCriterionHint
- the naming criterion to be used when producing target (child) pages names
-
isUseTerminalPages
public boolean isUseTerminalPages()
- Returns:
true
if the split parts are saved as terminal pages,false
otherwise (when nested pages are used instead)- See Also:
setUseTerminalPages(boolean)
-
setUseTerminalPages
public void setUseTerminalPages(boolean useTerminalPages)
Set whether to use terminal pages or nested pages for storing the newly split documents.- Parameters:
useTerminalPages
- whether to use terminal pages or nested pages
-
getBaseDocumentReference
public org.xwiki.model.reference.DocumentReference getBaseDocumentReference()
- Returns:
- the base document reference used for computing the child document references
- See Also:
setBaseDocumentReference(DocumentReference)
-
setBaseDocumentReference
public void setBaseDocumentReference(org.xwiki.model.reference.DocumentReference baseDocumentReference)
Set the base (root) document reference to be used when generating target document references for child (newly split) documents.- Parameters:
baseDocumentReference
- the base document reference used for computing the child document references
-
-