Package org.docx4j.model.structure
Class DocumentModel
java.lang.Object
org.docx4j.model.structure.DocumentModel
public class DocumentModel
extends java.lang.Object
Forgetting about sub documents, a docx
is made up of a number of sections,
each with their own section properties
(which define page dimensions, margins
etc).
So it is natural to think of a document
in terms of sections. But since in Open XML,
all sectPr elements - except the
document level one - are hidden in
paragraphs, our JAXB object model doesn't
expose this structure.
This class does that.
- Author:
- jharrop
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlog -
Constructor Summary
Constructors Constructor Description DocumentModel(WordprocessingMLPackage wordMLPackage) -
Method Summary
Modifier and Type Method Description java.util.List<SectionWrapper>getSections()voidrefresh()If you have added/deleted sections from your WordprocessingMLPackage, you'll need to call this method in order for the changes to be reflected in the DocumentModel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
DocumentModel
-
-
Method Details
-
refresh
public void refresh()If you have added/deleted sections from your WordprocessingMLPackage, you'll need to call this method in order for the changes to be reflected in the DocumentModel. -
getSections
- Returns:
- the sections
-