Package org.apache.poi.sl.extractor
Class SlideShowExtractor<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
java.lang.Object
org.apache.poi.sl.extractor.SlideShowExtractor<S,P>
- All Implemented Interfaces:
Closeable,AutoCloseable,POITextExtractor
- Direct Known Subclasses:
XSLFExtractor
public class SlideShowExtractor<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
extends Object
implements POITextExtractor
Common SlideShow extractor
- Since:
- 4.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.zaxxer.sparsebits.SparseBitSetgetCodepointsInSparseBitSet(String typeface, Boolean italic, Boolean bold) Extract the used codepoints for font embedding / subsetting.Returns opened documentReturns another text extractor, which is able to output the textual content of the document metadata / properties, such as author and title.List<? extends ObjectShape<S,P>> getText()Fetches all the slide text from the slideshow, but not the notes, unless you've called setSlidesByDefault() and setNotesByDefault() to change thisbooleanvoidsetCloseFilesystem(boolean doCloseFilesystem) voidsetCommentsByDefault(boolean commentsByDefault) Should a call to getText() return comments text? Default is novoidsetMasterByDefault(boolean masterByDefault) Should a call to getText() return text from master? Default is novoidsetNotesByDefault(boolean notesByDefault) Should a call to getText() return notes text? Default is novoidsetSlidesByDefault(boolean slidesByDefault) Should a call to getText() return slide text? Default is yesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
Field Details
-
slideshow
-
-
Constructor Details
-
SlideShowExtractor
-
-
Method Details
-
getDocument
Returns opened document- Specified by:
getDocumentin interfacePOITextExtractor- Returns:
- the opened document
-
setSlidesByDefault
public void setSlidesByDefault(boolean slidesByDefault) Should a call to getText() return slide text? Default is yes -
setNotesByDefault
public void setNotesByDefault(boolean notesByDefault) Should a call to getText() return notes text? Default is no -
setCommentsByDefault
public void setCommentsByDefault(boolean commentsByDefault) Should a call to getText() return comments text? Default is no -
setMasterByDefault
public void setMasterByDefault(boolean masterByDefault) Should a call to getText() return text from master? Default is no -
getMetadataTextExtractor
Description copied from interface:POITextExtractorReturns another text extractor, which is able to output the textual content of the document metadata / properties, such as author and title.- Specified by:
getMetadataTextExtractorin interfacePOITextExtractor- Returns:
- the metadata and text extractor
-
getText
Fetches all the slide text from the slideshow, but not the notes, unless you've called setSlidesByDefault() and setNotesByDefault() to change this- Specified by:
getTextin interfacePOITextExtractor- Returns:
- All the text from the document
-
getText
-
getOLEShapes
-
getCodepointsInSparseBitSet
@Internal public com.zaxxer.sparsebits.SparseBitSet getCodepointsInSparseBitSet(String typeface, Boolean italic, Boolean bold) Extract the used codepoints for font embedding / subsetting. This method is not intended for public use.- Parameters:
typeface- the typeface/font family of the textruns to examineitalic- usetruefor italic TextRuns,falsefor non-italic ones andnullif it doesn't matterbold- usetruefor bold TextRuns,falsefor non-bold ones andnullif it doesn't matter- Returns:
- a bitset with the marked/used codepoints
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem) - Specified by:
setCloseFilesystemin interfacePOITextExtractor- Parameters:
doCloseFilesystem-true(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()- Specified by:
isCloseFilesystemin interfacePOITextExtractor- Returns:
true, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
- Specified by:
getFilesystemin interfacePOITextExtractor- Returns:
- The underlying resources/filesystem
-