Package org.apache.poi.hdgf.extractor
Class VisioTextExtractor
- java.lang.Object
-
- org.apache.poi.hdgf.extractor.VisioTextExtractor
-
- All Implemented Interfaces:
Closeable,AutoCloseable,POIOLE2TextExtractor,POITextExtractor
public final class VisioTextExtractor extends Object implements POIOLE2TextExtractor
Class to find all the text in a Visio file, and return it. Can operate on the command line (outputs to stdout), or can return the text for you (example: for use with Lucene).
-
-
Constructor Summary
Constructors Constructor Description VisioTextExtractor(InputStream inp)VisioTextExtractor(HDGFDiagram hdgf)VisioTextExtractor(DirectoryNode dir)VisioTextExtractor(POIFSFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getAllText()Locates all the text entries in the file, and returns their contents.HDGFDiagramgetDocument()HDGFDiagramgetFilesystem()StringgetText()Returns the textual contents of the file.booleanisCloseFilesystem()voidsetCloseFilesystem(boolean doCloseFilesystem)-
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.POIOLE2TextExtractor
getDocSummaryInformation, getMetadataTextExtractor, getRoot, getSummaryInformation
-
Methods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
-
-
-
Constructor Detail
-
VisioTextExtractor
public VisioTextExtractor(HDGFDiagram hdgf)
-
VisioTextExtractor
public VisioTextExtractor(POIFSFileSystem fs) throws IOException
- Throws:
IOException
-
VisioTextExtractor
public VisioTextExtractor(DirectoryNode dir) throws IOException
- Throws:
IOException
-
VisioTextExtractor
public VisioTextExtractor(InputStream inp) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getAllText
public String[] getAllText()
Locates all the text entries in the file, and returns their contents.- Returns:
- An array of each Text item in the document
-
getText
public String getText()
Returns the textual contents of the file. Each textual object's text will be separated by a newline- Specified by:
getTextin interfacePOITextExtractor- Returns:
- All text contained in this document, separated by
\n
-
getDocument
public HDGFDiagram getDocument()
- Specified by:
getDocumentin interfacePOIOLE2TextExtractor- Specified by:
getDocumentin interfacePOITextExtractor
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystemin interfacePOITextExtractor
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystemin interfacePOITextExtractor
-
getFilesystem
public HDGFDiagram getFilesystem()
- Specified by:
getFilesystemin interfacePOITextExtractor
-
-