* @see org.apache.poi.hwpf.extractor.WordExtractor
*/
public abstract class POIOLE2TextExtractor extends POITextExtractor {
+ /** The POIDocument that's open */
+ protected POIDocument document;
+
/**
* Creates a new text extractor for the given document
*
* @param document The POIDocument to use in this extractor.
*/
public POIOLE2TextExtractor(POIDocument document) {
- super(document);
+ this.document = document;
}
+ /**
+ * Creates a new text extractor, using the same
+ * document as another text extractor. Normally
+ * only used by properties extractors.
+ */
+ protected POIOLE2TextExtractor(POIOLE2TextExtractor otherExtractor) {
+ this.document = otherExtractor.document;
+ }
+
/**
* Returns the document information metadata for the document
*
* @see org.apache.poi.hwpf.extractor.WordExtractor
*/
public abstract class POITextExtractor implements Closeable {
- /** The POIDocument that's open */
- protected POIDocument document;
-
- /**
- * Creates a new text extractor for the given document
- */
- public POITextExtractor(POIDocument document) {
- this.document = document;
- }
- /**
- * Creates a new text extractor, using the same
- * document as another text extractor. Normally
- * only used by properties extractors.
- */
- protected POITextExtractor(POITextExtractor otherExtractor) {
- this.document = otherExtractor.document;
- }
-
/**
* Retrieves all the text from the document.
* How cells, paragraphs etc are separated in the text
import java.util.Iterator;
import org.apache.poi.POIDocument;
+import org.apache.poi.POIOLE2TextExtractor;
import org.apache.poi.POITextExtractor;
import org.apache.poi.hpsf.CustomProperties;
import org.apache.poi.hpsf.DocumentSummaryInformation;
* build in and custom, returning them in
* textual form.
*/
-public class HPSFPropertiesExtractor extends POITextExtractor {
+public class HPSFPropertiesExtractor extends POIOLE2TextExtractor {
private Closeable toClose;
- public HPSFPropertiesExtractor(POITextExtractor mainExtractor) {
+ public HPSFPropertiesExtractor(POIOLE2TextExtractor mainExtractor) {
super(mainExtractor);
}
public HPSFPropertiesExtractor(POIDocument doc) {
import java.util.ArrayList;
import java.util.List;
+import org.apache.poi.POIDocument;
import org.apache.poi.POIOLE2TextExtractor;
import org.apache.poi.hpsf.DocumentSummaryInformation;
import org.apache.poi.hpsf.SummaryInformation;
public EventBasedExcelExtractor( DirectoryNode dir )
{
- super( null );
+ super( (POIDocument)null );
_dir = dir;
}
* Creates a new text extractor for the given document
*/
public POIXMLTextExtractor(POIXMLDocument document) {
- super((POIDocument)null);
-
_document = document;
}