org.apache.poi.ooxml.extractor

## Class POIXMLTextExtractor

- java.lang.Object
- - org.apache.poi.extractor.POITextExtractor
  - - org.apache.poi.ooxml.extractor.POIXMLTextExtractor

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
  Direct Known Subclasses:
    POIXMLPropertiesTextExtractor, XDGFVisioExtractor, XSLFPowerPointExtractor, XSSFEventBasedExcelExtractor, XSSFExcelExtractor, XWPFWordExtractor

      public abstract class POIXMLTextExtractor
      extends POITextExtractor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `POIXMLTextExtractor(POIXMLDocument document)` Creates a new text extractor for the given document

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkMaxTextSize(java.lang.CharSequence text, java.lang.String string)`
    `void` | `close()` Allows to free resources of the Extractor as soon as it is not needed any more.
    `POIXMLProperties.CoreProperties` | `getCoreProperties()` Returns the core document properties
    `POIXMLProperties.CustomProperties` | `getCustomProperties()` Returns the custom document properties
    `POIXMLDocument` | `getDocument()` Returns opened document
    `POIXMLProperties.ExtendedProperties` | `getExtendedProperties()` Returns the extended document properties
    `POIXMLPropertiesTextExtractor` | `getMetadataTextExtractor()` Returns an OOXML properties text extractor for the document properties metadata, such as title and author.
    `OPCPackage` | `getPackage()` Returns the opened OPCPackage that contains the document

    - ### Methods inherited from class org.apache.poi.extractor.POITextExtractor

      `getText, setFilesystem`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### POIXMLTextExtractor

          public POIXMLTextExtractor(POIXMLDocument document)

      Creates a new text extractor for the given document
      Parameters:
        `document` - the document to extract from

  - ### Method Detail

    - #### getCoreProperties

          public POIXMLProperties.CoreProperties getCoreProperties()

      Returns the core document properties
      Returns:
        the core document properties

    - #### getExtendedProperties

          public POIXMLProperties.ExtendedProperties getExtendedProperties()

      Returns the extended document properties
      Returns:
        the extended document properties

    - #### getCustomProperties

          public POIXMLProperties.CustomProperties getCustomProperties()

      Returns the custom document properties
      Returns:
        the custom document properties

    - #### getDocument

          public final POIXMLDocument getDocument()

      Returns opened document
      Specified by:
        `getDocument` in class `POITextExtractor`
      Returns:
        the opened document

    - #### getPackage

          public OPCPackage getPackage()

      Returns the opened OPCPackage that contains the document
      Returns:
        the opened OPCPackage

    - #### getMetadataTextExtractor

          public POIXMLPropertiesTextExtractor getMetadataTextExtractor()

      Returns an OOXML properties text extractor for the document properties metadata, such as title and author.
      Specified by:
        `getMetadataTextExtractor` in class `POITextExtractor`
      Returns:
        the metadata and text extractor

    - #### close

          public void close()
                     throws java.io.IOException

      Description copied from class: `POITextExtractor`
      Allows to free resources of the Extractor as soon as it is not needed any more. This may include closing open file handles and freeing memory. The Extractor cannot be used after close has been called.
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `POITextExtractor`
      Throws:
        `java.io.IOException`

    - #### checkMaxTextSize

          protected void checkMaxTextSize(java.lang.CharSequence text,
                                          java.lang.String string)

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.