Package org.apache.poi.hpbf.extractor
Class PublisherTextExtractor
- java.lang.Object
-
- org.apache.poi.hpbf.extractor.PublisherTextExtractor
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,POIOLE2TextExtractor
,POITextExtractor
public final class PublisherTextExtractor extends java.lang.Object implements POIOLE2TextExtractor
Extract text from HPBF Publisher files
-
-
Constructor Summary
Constructors Constructor Description PublisherTextExtractor(java.io.InputStream is)
PublisherTextExtractor(HPBFDocument doc)
PublisherTextExtractor(DirectoryNode dir)
PublisherTextExtractor(POIFSFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HPBFDocument
getDocument()
Return the underlying POIDocumentHPBFDocument
getFilesystem()
java.lang.String
getText()
Retrieves all the text from the document.boolean
isCloseFilesystem()
void
setCloseFilesystem(boolean doCloseFilesystem)
void
setHyperlinksByDefault(boolean hyperlinksByDefault)
Should a call to getText() return hyperlinks inline with the text? Default is no-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.extractor.POIOLE2TextExtractor
getDocSummaryInformation, getMetadataTextExtractor, getRoot, getSummaryInformation
-
Methods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
-
-
-
Constructor Detail
-
PublisherTextExtractor
public PublisherTextExtractor(HPBFDocument doc)
-
PublisherTextExtractor
public PublisherTextExtractor(DirectoryNode dir) throws java.io.IOException
- Throws:
java.io.IOException
-
PublisherTextExtractor
public PublisherTextExtractor(POIFSFileSystem fs) throws java.io.IOException
- Throws:
java.io.IOException
-
PublisherTextExtractor
public PublisherTextExtractor(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
setHyperlinksByDefault
public void setHyperlinksByDefault(boolean hyperlinksByDefault)
Should a call to getText() return hyperlinks inline with the text? Default is no
-
getText
public java.lang.String getText()
Description copied from interface:POITextExtractor
Retrieves all the text from the document. How cells, paragraphs etc are separated in the text is implementation specific - see the javadocs for a specific project for details.- Specified by:
getText
in interfacePOITextExtractor
- Returns:
- All the text from the document
-
getDocument
public HPBFDocument getDocument()
Description copied from interface:POIOLE2TextExtractor
Return the underlying POIDocument- Specified by:
getDocument
in interfacePOIOLE2TextExtractor
- Specified by:
getDocument
in interfacePOITextExtractor
- Returns:
- the underlying POIDocument
-
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 HPBFDocument getFilesystem()
- Specified by:
getFilesystem
in interfacePOITextExtractor
- Returns:
- The underlying resources/filesystem
-
-