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 HPBFDocumentgetDocument()Return the underlying POIDocumentHPBFDocumentgetFilesystem()java.lang.StringgetText()Retrieves all the text from the document.booleanisCloseFilesystem()voidsetCloseFilesystem(boolean doCloseFilesystem)voidsetHyperlinksByDefault(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:POITextExtractorRetrieves 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:
getTextin interfacePOITextExtractor- Returns:
- All the text from the document
-
getDocument
public HPBFDocument getDocument()
Description copied from interface:POIOLE2TextExtractorReturn the underlying POIDocument- Specified by:
getDocumentin interfacePOIOLE2TextExtractor- Specified by:
getDocumentin interfacePOITextExtractor- Returns:
- the underlying POIDocument
-
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
public HPBFDocument getFilesystem()
- Specified by:
getFilesystemin interfacePOITextExtractor- Returns:
- The underlying resources/filesystem
-
-