Class MainPresentationPart
java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.parts.Part
org.docx4j.openpackaging.parts.JaxbXmlPart<E>
org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware<E>
org.docx4j.openpackaging.parts.PresentationML.JaxbPmlPart<Presentation>
org.docx4j.openpackaging.parts.PresentationML.MainPresentationPart
- All Implemented Interfaces:
XPathEnabled<Presentation>
public final class MainPresentationPart extends JaxbPmlPart<Presentation>
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerlogFields inherited from class org.docx4j.openpackaging.parts.PresentationML.JaxbPmlPart
COLOR_MAPPING, COMMON_SLIDE_DATA, randomFields inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
jaxbElement, jc, MAX_BYTES_Unmarshal_Error -
Constructor Summary
Constructors Constructor Description MainPresentationPart()MainPresentationPart(PartName partName) -
Method Summary
Modifier and Type Method Description voidaddSlide(int index, SlidePart slidePart)Inserts the slide at the specified position in the presentation.booleanaddSlide(SlidePart slidePart)Append the slide at the end of the presentation.Presentation.SldIdLst.SldIdaddSlideIdListEntry(SlidePart slidePart)Add a slide to this presentation.Presentation.SldIdLst.SldIdaddSlideIdListEntry(SlidePart slidePart, RelationshipsPart.AddPartBehaviour mode)Deprecated.Presentation.SldMasterIdLst.SldMasterIdaddSlideMasterIdListEntry(SlideMasterPart slideMasterPart)static PresentationcreateJaxbPresentationElement()static PresentationcreateJaxbPresentationElement(SlideSizesWellKnown sz, boolean landscape)static Presentation.SldSzcreateSlideSize(SlideSizesWellKnown sz, boolean landscape)CommentAuthorsPartgetCommentAuthorsPart()CTExtensiongetExtContaining(java.lang.Class containingClass)get p:ext containing specified classCTExtendedGuideListgetExtendedGuideList(boolean createIfAbsent)CTExtensionListgetExtensionList(boolean createIfAbsent)NotesMasterPartgetNotesMasterPart(boolean createIfAbsent)getNotesMasterPart creating if createIfAbsent flag allowsCTSectiongetSection(SlidePart sp)CTSectionListgetSectionList(boolean createIfAbsent)Presentation.SldIdLst.SldIdgetSldIdByRelId(java.lang.String relId)Get a SdlId from SldIdLst by its relIdSlidePartgetSlide(int index)intgetSlideCount()java.util.List<SlidePart>getSlideParts()ThemePartgetThemePart()voidinit()booleanremoveExt(java.lang.Class containingClass)remove the p:ext containing specified classvoidremoveSlide(int index)voidremoveSlide(Relationship rel)booleansetPartShortcut(Part part)booleansetPartShortcut(Part part, java.lang.String relationshipType)Tell the source Part about this target Part, so the source can use this part via a convenience method.Methods inherited from class org.docx4j.openpackaging.parts.PresentationML.JaxbPmlPart
getSlideId, getSlideLayoutOrMasterId, newPartForContentTypeMethods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware
createBinderAndJaxbElement, getBinder, getJAXBAssociationsForXPath, getJAXBAssociationsForXPath, getJAXBNodesViaXPath, getJAXBNodesViaXPath, setJaxbElement, unmarshal, unmarshalMethods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, setMceIgnorable, transform, variableReplaceMethods inherited from class org.docx4j.openpackaging.parts.Part
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setRelationshipType, setSourceRelationship, setVersionMethods inherited from class org.docx4j.openpackaging.Base
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
Method Details
-
init
public void init() -
setPartShortcut
-
setPartShortcut
Description copied from class:BaseTell the source Part about this target Part, so the source can use this part via a convenience method.- Overrides:
setPartShortcutin classPart- Returns:
- true if the source Part does use the target Part in a convenience method.
-
getCommentAuthorsPart
- Since:
- 3.2.0
-
getThemePart
- Since:
- 8.1.3
-
getNotesMasterPart
getNotesMasterPart creating if createIfAbsent flag allows- Throws:
Pptx4jException- Since:
- 8.1.3
-
createSlideSize
- Since:
- 2.7
-
createJaxbPresentationElement
- Throws:
javax.xml.bind.JAXBException
-
createJaxbPresentationElement
public static Presentation createJaxbPresentationElement(SlideSizesWellKnown sz, boolean landscape) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException- Since:
- 2.7
-
addSlideIdListEntry
public Presentation.SldIdLst.SldId addSlideIdListEntry(SlidePart slidePart) throws InvalidFormatExceptionAdd a slide to this presentation.- Parameters:
slidePart-- Returns:
- Throws:
InvalidFormatException
-
addSlideIdListEntry
@Deprecated public Presentation.SldIdLst.SldId addSlideIdListEntry(SlidePart slidePart, RelationshipsPart.AddPartBehaviour mode) throws InvalidFormatExceptionDeprecated.- Throws:
InvalidFormatException- Since:
- 2.8.1
-
addSlideMasterIdListEntry
public Presentation.SldMasterIdLst.SldMasterId addSlideMasterIdListEntry(SlideMasterPart slideMasterPart) throws InvalidFormatException- Throws:
InvalidFormatException
-
addSlide
Append the slide at the end of the presentation.- Parameters:
slidePart-- Throws:
Pptx4jException- Since:
- 3.0
-
addSlide
Inserts the slide at the specified position in the presentation. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).- Parameters:
index-slidePart-- Throws:
Pptx4jException- Since:
- 3.0
-
removeSlide
- Parameters:
index-- Throws:
Pptx4jException- Since:
- 3.0
-
removeSlide
- Parameters:
rel-- Throws:
Pptx4jException- Since:
- 3.0
-
getSlide
- Parameters:
index-- Throws:
Pptx4jException- Since:
- 3.0.1
-
getSlideParts
- Throws:
Pptx4jException- Since:
- 3.4
-
getSlideCount
- Parameters:
index-- Throws:
Pptx4jException- Since:
- 3.2.0
-
getExtContaining
get p:ext containing specified class- Parameters:
extLst-containingClass-- Returns:
- Since:
- 8.1.0
-
removeExt
public boolean removeExt(java.lang.Class containingClass)remove the p:ext containing specified class- Parameters:
containingClass-- Returns:
- Since:
- 8.1.0
-
getSectionList
- Since:
- 8.1.0
-
getExtendedGuideList
- Since:
- 8.1.0
-
getExtensionList
- Since:
- 8.1.0
-
getSection
- Since:
- 8.1.0
-
getSldIdByRelId
Get a SdlId from SldIdLst by its relId- Parameters:
relId-- Returns:
- Since:
- 8.1.0
-