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
public class SlideShowExtractor<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> extends Object implements POITextExtractor
Common SlideShow extractor- Since:
- POI 4.0.0
-
-
Constructor Summary
Constructors Constructor Description SlideShowExtractor(SlideShow<S,P> slideshow)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BitSet
getCodepoints(String typeface, Boolean italic, Boolean bold)
Deprecated.com.zaxxer.sparsebits.SparseBitSet
getCodepointsInSparseBitSet(String typeface, Boolean italic, Boolean bold)
Extract the used codepoints for font embedding / subsetting.SlideShow<S,P>
getDocument()
Returns opened documentSlideShow<S,P>
getFilesystem()
POITextExtractor
getMetadataTextExtractor()
Returns 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>>
getOLEShapes()
String
getText()
Fetches all the slide text from the slideshow, but not the notes, unless you've called setSlidesByDefault() and setNotesByDefault() to change thisString
getText(Slide<S,P> slide)
boolean
isCloseFilesystem()
void
setCloseFilesystem(boolean doCloseFilesystem)
void
setCommentsByDefault(boolean commentsByDefault)
Should a call to getText() return comments text? Default is novoid
setMasterByDefault(boolean masterByDefault)
Should a call to getText() return text from master? Default is novoid
setNotesByDefault(boolean notesByDefault)
Should a call to getText() return notes text? Default is novoid
setSlidesByDefault(boolean slidesByDefault)
Should a call to getText() return slide text? Default is yes-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
-
-
-
Method Detail
-
getDocument
public SlideShow<S,P> getDocument()
Returns opened document- Specified by:
getDocument
in 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
public POITextExtractor getMetadataTextExtractor()
Description copied from interface:POITextExtractor
Returns another text extractor, which is able to output the textual content of the document metadata / properties, such as author and title.- Specified by:
getMetadataTextExtractor
in interfacePOITextExtractor
- Returns:
- the metadata and text extractor
-
getText
public String 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:
getText
in interfacePOITextExtractor
- Returns:
- All the text from the document
-
getOLEShapes
public List<? extends ObjectShape<S,P>> getOLEShapes()
-
getCodepoints
@Deprecated @Removal(version="6.0.0") public BitSet getCodepoints(String typeface, Boolean italic, Boolean bold)
Deprecated.Extract the used codepoints for font embedding / subsetting- Parameters:
typeface
- the typeface/font family of the textruns to examineitalic
- usetrue
for italic TextRuns,false
for non-italic ones andnull
if it doesn't matterbold
- usetrue
for bold TextRuns,false
for non-bold ones andnull
if it doesn't matter- Returns:
- a bitset with the marked/used codepoints
-
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
- usetrue
for italic TextRuns,false
for non-italic ones andnull
if it doesn't matterbold
- usetrue
for bold TextRuns,false
for non-bold ones andnull
if it doesn't matter- Returns:
- a bitset with the marked/used codepoints
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystem
in interfacePOITextExtractor
- Parameters:
doCloseFilesystem
-true
(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystem
in interfacePOITextExtractor
- Returns:
true
, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
public SlideShow<S,P> getFilesystem()
- Specified by:
getFilesystem
in interfacePOITextExtractor
- Returns:
- The underlying resources/filesystem
-
-