Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hpsf
Class DocumentSummaryInformation

    java.lang.Object
      org.apache.poi.hpsf.PropertySet
          org.apache.poi.hpsf.MutablePropertySet
              org.apache.poi.hpsf.SpecialPropertySet
                  org.apache.poi.hpsf.DocumentSummaryInformation

    public class DocumentSummaryInformation

extends SpecialPropertySet

Convenience class representing a DocumentSummary Information stream in a Microsoft Office document.

See Also:
  `SummaryInformation`

Field Summary
`static java.lang.String` | `DEFAULT_STREAM_NAME` The document name a document summary information stream usually has in a POIFS filesystem.

Fields inherited from class org.apache.poi.hpsf.PropertySet
`OS_MACINTOSH, OS_WIN16, OS_WIN32`

Constructor Summary
`DocumentSummaryInformation()` Creates an empty `DocumentSummaryInformation`.
`DocumentSummaryInformation(java.io.InputStream stream)` Creates a `DocumentSummaryInformation` instance from an `InputStream` in the Horrible Property Set Format.
`DocumentSummaryInformation(PropertySet ps)` Creates a `DocumentSummaryInformation` from a given `PropertySet`.

Method Summary
`int` | `getApplicationVersion()` Gets the version of the Application which wrote the Property set, stored with the two high order bytes having the major version number, and the two low order bytes the minor version number.
`int` | `getByteCount()` Returns the byte count or 0 if the `DocumentSummaryInformation` does not contain a byte count.
`java.lang.String` | `getCategory()` Returns the category (or `null`).
`int` | `getCharCountWithSpaces()` Returns the character count including whitespace, or 0 if the `DocumentSummaryInformation` does not contain this char count.
`java.lang.String` | `getCompany()` Returns the company (or `null`).
`java.lang.String` | `getContentStatus()` Gets the content status of the file (or `null`).
`java.lang.String` | `getContentType()` Gets the content type of the file (or `null`).
`CustomProperties` | `getCustomProperties()` Gets the custom properties.
`byte[]` | `getDocparts()` Returns the doc parts (or `null`) when this method is implemented.
`java.lang.String` | `getDocumentVersion()` Gets the document version as a string, which is normally unset and empty (or `null`).
`byte[]` | `getHeadingPair()` Returns the heading pair (or `null`) when this method is implemented.
`int` | `getHiddenCount()` Returns the hidden count or 0 if the `DocumentSummaryInformation` does not contain a hidden count.
`boolean` | `getHyperlinksChanged()` Get if the User Defined Property Set has been updated outside of the Application.
`java.lang.String` | `getLanguage()` Gets the document language, which is normally unset and empty (or `null`).
`int` | `getLineCount()` Returns the line count or 0 if the `DocumentSummaryInformation` does not contain a line count.
`boolean` | `getLinksDirty()` Returns `true` if the custom links are dirty.
`java.lang.String` | `getManager()` Returns the manager (or `null`).
`int` | `getMMClipCount()` Returns the mmclip count or 0 if the `DocumentSummaryInformation` does not contain a mmclip count.
`int` | `getNoteCount()` Returns the note count or 0 if the `DocumentSummaryInformation` does not contain a note count.
`int` | `getParCount()` Returns the par count or 0 if the `DocumentSummaryInformation` does not contain a par count.
`java.lang.String` | `getPresentationFormat()` Returns the presentation format (or `null`).
`PropertyIDMap` | `getPropertySetIDMap()` The id to name mapping of the properties in this set.
`boolean` | `getScale()` Returns `true` when scaling of the thumbnail is desired, `false` if cropping is desired.
`int` | `getSlideCount()` Returns the slide count or 0 if the `DocumentSummaryInformation` does not contain a slide count.
`byte[]` | `getVBADigitalSignature()` Returns the VBA digital signature for the VBA project embedded in the document (or `null`).
`void` | `removeApplicationVersion()` Removes the Application Version
`void` | `removeByteCount()` Removes the byte count.
`void` | `removeCategory()` Removes the category.
`void` | `removeCharCountWithSpaces()` Removes the character count
`void` | `removeCompany()` Removes the company.
`void` | `removeContentStatus()` Removes the content status of the file
`void` | `removeContentType()` Removes the content type of the file
`void` | `removeCustomProperties()` Removes the custom properties.
`void` | `removeDocparts()` Removes the doc parts.
`void` | `removeDocumentVersion()` Removes the document version string
`void` | `removeHeadingPair()` Removes the heading pair.
`void` | `removeHiddenCount()` Removes the hidden count.
`void` | `removeHyperlinksChanged()` Removes the flag for if the User Defined Property Set has been updated outside of the Application.
`void` | `removeLanguage()` Removes the document language
`void` | `removeLineCount()` Removes the line count.
`void` | `removeLinksDirty()` Removes the links dirty.
`void` | `removeManager()` Removes the manager.
`void` | `removeMMClipCount()` Removes the mmclip count.
`void` | `removeNoteCount()` Removes the noteCount.
`void` | `removeParCount()` Removes the par count.
`void` | `removePresentationFormat()` Removes the presentation format.
`void` | `removeScale()` Removes the scale.
`void` | `removeSlideCount()` Removes the slide count.
`void` | `removeVBADigitalSignature()` Removes the VBA Digital Signature
`void` | `setApplicationVersion(int version)` Sets the Application version, which must be a 4 byte int with the two high order bytes having the major version number, and the two low order bytes the minor version number.
`void` | `setByteCount(int byteCount)` Sets the byte count.
`void` | `setCategory(java.lang.String category)` Sets the category.
`void` | `setCharCountWithSpaces(int count)` Sets the character count including whitespace
`void` | `setCompany(java.lang.String company)` Sets the company.
`void` | `setContentStatus(java.lang.String status)` Sets the content status of the file
`void` | `setContentType(java.lang.String type)` Sets the content type of the file
`void` | `setCustomProperties(CustomProperties customProperties)` Sets the custom properties.
`void` | `setDocparts(byte[] docparts)` Sets the doc parts.
`void` | `setDocumentVersion(java.lang.String version)` Sets the document version string
`void` | `setHeadingPair(byte[] headingPair)` Sets the heading pair.
`void` | `setHiddenCount(int hiddenCount)` Sets the hidden count.
`void` | `setHyperlinksChanged(boolean changed)` Set the flag for if the User Defined Property Set has been updated outside of the Application.
`void` | `setLanguage(java.lang.String language)` Set the document language
`void` | `setLineCount(int lineCount)` Sets the line count.
`void` | `setLinksDirty(boolean linksDirty)` Sets the linksDirty.
`void` | `setManager(java.lang.String manager)` Sets the manager.
`void` | `setMMClipCount(int mmClipCount)` Sets the mmclip count.
`void` | `setNoteCount(int noteCount)` Sets the note count.
`void` | `setParCount(int parCount)` Sets the par count.
`void` | `setPresentationFormat(java.lang.String presentationFormat)` Sets the presentation format.
`void` | `setScale(boolean scale)` Sets the scale.
`void` | `setSlideCount(int slideCount)` Sets the slideCount.
`void` | `setVBADigitalSignature(byte[] signature)` Sets the VBA digital signature for the VBA project embedded in the document.

Methods inherited from class org.apache.poi.hpsf.PropertySet
`addSection, clearSections, equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyBooleanValue, getPropertyIntValue, getPropertyStringValue, getPropertyStringValue, getSectionCount, getSections, getSingleSection, hashCode, isDocumentSummaryInformation, isPropertySetStream, isPropertySetStream, isSummaryInformation, remove1stProperty, set1stProperty, set1stProperty, set1stProperty, set1stProperty, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_STREAM_NAME

    public static final java.lang.String DEFAULT_STREAM_NAME

  The document name a document summary information stream usually has in a POIFS filesystem.

  See Also:
    Constant Field Values

Constructor Detail

### DocumentSummaryInformation

    public DocumentSummaryInformation()

  Creates an empty `DocumentSummaryInformation`.

### DocumentSummaryInformation

    public DocumentSummaryInformation(PropertySet ps)
                               throws UnexpectedPropertySetTypeException

  Creates a `DocumentSummaryInformation` from a given `PropertySet`.

  Parameters:
    `ps` - A property set which should be created from a document summary information stream.
  Throws:
    `UnexpectedPropertySetTypeException` - if `ps` does not contain a document summary information stream.

### DocumentSummaryInformation

    public DocumentSummaryInformation(java.io.InputStream stream)
                               throws NoPropertySetStreamException,
                                      MarkUnsupportedException,
                                      java.io.IOException,
                                      java.io.UnsupportedEncodingException

  Creates a `DocumentSummaryInformation` instance from an `InputStream` in the Horrible Property Set Format.

  The constructor reads the first few bytes from the stream and determines whether it is really a property set stream. If it is, it parses the rest of the stream. If it is not, it resets the stream to its beginning in order to let other components mess around with the data and throws an exception.

  Parameters:
    `stream` - Holds the data making out the property set stream.
  Throws:
    `MarkUnsupportedException` - if the stream does not support the `InputStream.markSupported()` method.
    `java.io.IOException` - if the `InputStream` cannot be accessed as needed.
    `NoPropertySetStreamException` - if the input stream does not contain a property set.
    `java.io.UnsupportedEncodingException` - if a character encoding is not supported.

Method Detail

### getPropertySetIDMap

    public PropertyIDMap getPropertySetIDMap()

  Description copied from class: `PropertySet`
  The id to name mapping of the properties in this set.

  Overrides:
    `getPropertySetIDMap` in class `PropertySet`
  Returns:
    the id to name mapping of the properties in this set or `null` if not applicable

### getCategory

    public java.lang.String getCategory()

  Returns the category (or `null`).

  Returns:
    The category value

### setCategory

    public void setCategory(java.lang.String category)

  Sets the category.

  Parameters:
    `category` - The category to set.

### removeCategory

    public void removeCategory()

  Removes the category.

### getPresentationFormat

    public java.lang.String getPresentationFormat()

  Returns the presentation format (or `null`).

  Returns:
    The presentation format value

### setPresentationFormat

    public void setPresentationFormat(java.lang.String presentationFormat)

  Sets the presentation format.

  Parameters:
    `presentationFormat` - The presentation format to set.

### removePresentationFormat

    public void removePresentationFormat()

  Removes the presentation format.

### getByteCount

    public int getByteCount()

  Returns the byte count or 0 if the `DocumentSummaryInformation` does not contain a byte count.

  Returns:
    The byteCount value

### setByteCount

    public void setByteCount(int byteCount)

  Sets the byte count.

  Parameters:
    `byteCount` - The byte count to set.

### removeByteCount

    public void removeByteCount()

  Removes the byte count.

### getLineCount

    public int getLineCount()

  Returns the line count or 0 if the `DocumentSummaryInformation` does not contain a line count.

  Returns:
    The line count value

### setLineCount

    public void setLineCount(int lineCount)

  Sets the line count.

  Parameters:
    `lineCount` - The line count to set.

### removeLineCount

    public void removeLineCount()

  Removes the line count.

### getParCount

    public int getParCount()

  Returns the par count or 0 if the `DocumentSummaryInformation` does not contain a par count.

  Returns:
    The par count value

### setParCount

    public void setParCount(int parCount)

  Sets the par count.

  Parameters:
    `parCount` - The par count to set.

### removeParCount

    public void removeParCount()

  Removes the par count.

### getSlideCount

    public int getSlideCount()

  Returns the slide count or 0 if the `DocumentSummaryInformation` does not contain a slide count.

  Returns:
    The slide count value

### setSlideCount

    public void setSlideCount(int slideCount)

  Sets the slideCount.

  Parameters:
    `slideCount` - The slide count to set.

### removeSlideCount

    public void removeSlideCount()

  Removes the slide count.

### getNoteCount

    public int getNoteCount()

  Returns the note count or 0 if the `DocumentSummaryInformation` does not contain a note count.

  Returns:
    The note count value

### setNoteCount

    public void setNoteCount(int noteCount)

  Sets the note count.

  Parameters:
    `noteCount` - The note count to set.

### removeNoteCount

    public void removeNoteCount()

  Removes the noteCount.

### getHiddenCount

    public int getHiddenCount()

  Returns the hidden count or 0 if the `DocumentSummaryInformation` does not contain a hidden count.

  Returns:
    The hidden count value

### setHiddenCount

    public void setHiddenCount(int hiddenCount)

  Sets the hidden count.

  Parameters:
    `hiddenCount` - The hidden count to set.

### removeHiddenCount

    public void removeHiddenCount()

  Removes the hidden count.

### getMMClipCount

    public int getMMClipCount()

  Returns the mmclip count or 0 if the `DocumentSummaryInformation` does not contain a mmclip count.

  Returns:
    The mmclip count value

### setMMClipCount

    public void setMMClipCount(int mmClipCount)

  Sets the mmclip count.

  Parameters:
    `mmClipCount` - The mmclip count to set.

### removeMMClipCount

    public void removeMMClipCount()

  Removes the mmclip count.

### getScale

    public boolean getScale()

  Returns `true` when scaling of the thumbnail is desired, `false` if cropping is desired.

  Returns:
    The scale value

### setScale

    public void setScale(boolean scale)

  Sets the scale.

  Parameters:
    `scale` - The scale to set.

### removeScale

    public void removeScale()

  Removes the scale.

### getHeadingPair

    public byte[] getHeadingPair()

  Returns the heading pair (or `null`) when this method is implemented. Please note that the return type is likely to change!

  Returns:
    The heading pair value

### setHeadingPair

    public void setHeadingPair(byte[] headingPair)

  Sets the heading pair.

  Parameters:
    `headingPair` - The heading pair to set.

### removeHeadingPair

    public void removeHeadingPair()

  Removes the heading pair.

### getDocparts

    public byte[] getDocparts()

  Returns the doc parts (or `null`) when this method is implemented. Please note that the return type is likely to change!

  Returns:
    The doc parts value

### setDocparts

    public void setDocparts(byte[] docparts)

  Sets the doc parts.

  Parameters:
    `docparts` - The doc parts to set.

### removeDocparts

    public void removeDocparts()

  Removes the doc parts.

### getManager

    public java.lang.String getManager()

  Returns the manager (or `null`).

  Returns:
    The manager value

### setManager

    public void setManager(java.lang.String manager)

  Sets the manager.

  Parameters:
    `manager` - The manager to set.

### removeManager

    public void removeManager()

  Removes the manager.

### getCompany

    public java.lang.String getCompany()

  Returns the company (or `null`).

  Returns:
    The company value

### setCompany

    public void setCompany(java.lang.String company)

  Sets the company.

  Parameters:
    `company` - The company to set.

### removeCompany

    public void removeCompany()

  Removes the company.

### getLinksDirty

    public boolean getLinksDirty()

  Returns `true` if the custom links are dirty.

  Returns:
    The links dirty value

### setLinksDirty

    public void setLinksDirty(boolean linksDirty)

  Sets the linksDirty.

  Parameters:
    `linksDirty` - The links dirty value to set.

### removeLinksDirty

    public void removeLinksDirty()

  Removes the links dirty.

### getCharCountWithSpaces

    public int getCharCountWithSpaces()

  Returns the character count including whitespace, or 0 if the `DocumentSummaryInformation` does not contain this char count.

  This is the whitespace-including version of `SummaryInformation.getCharCount()`

  Returns:
    The character count or `null`

### setCharCountWithSpaces

    public void setCharCountWithSpaces(int count)

  Sets the character count including whitespace

  Parameters:
    `count` - The character count to set.

### removeCharCountWithSpaces

    public void removeCharCountWithSpaces()

  Removes the character count

### getHyperlinksChanged

    public boolean getHyperlinksChanged()

  Get if the User Defined Property Set has been updated outside of the Application.

  If it has (true), the hyperlinks should be updated on document load.

  Returns:
    true, if the hyperlinks should be updated on document load

### setHyperlinksChanged

    public void setHyperlinksChanged(boolean changed)

  Set the flag for if the User Defined Property Set has been updated outside of the Application.

  Parameters:
    `changed` - true, if the User Defined Property Set has been updated

### removeHyperlinksChanged

    public void removeHyperlinksChanged()

  Removes the flag for if the User Defined Property Set has been updated outside of the Application.

### getApplicationVersion

    public int getApplicationVersion()

  Gets the version of the Application which wrote the Property set, stored with the two high order bytes having the major version number, and the two low order bytes the minor version number.

  This will be 0 if no version is set.

  Returns:
    the Application version

### setApplicationVersion

    public void setApplicationVersion(int version)

  Sets the Application version, which must be a 4 byte int with the two high order bytes having the major version number, and the two low order bytes the minor version number.

  Parameters:
    `version` - the Application version

### removeApplicationVersion

    public void removeApplicationVersion()

  Removes the Application Version

### getVBADigitalSignature

    public byte[] getVBADigitalSignature()

  Returns the VBA digital signature for the VBA project embedded in the document (or `null`).

  Returns:
    the VBA digital signature

### setVBADigitalSignature

    public void setVBADigitalSignature(byte[] signature)

  Sets the VBA digital signature for the VBA project embedded in the document.

  Parameters:
    `signature` - VBA Digital Signature for the project

### removeVBADigitalSignature

    public void removeVBADigitalSignature()

  Removes the VBA Digital Signature

### getContentType

    public java.lang.String getContentType()

  Gets the content type of the file (or `null`).

  Returns:
    the content type of the file

### setContentType

    public void setContentType(java.lang.String type)

  Sets the content type of the file

  Parameters:
    `type` - the content type of the file

### removeContentType

    public void removeContentType()

  Removes the content type of the file

### getContentStatus

    public java.lang.String getContentStatus()

  Gets the content status of the file (or `null`).

  Returns:
    the content status of the file

### setContentStatus

    public void setContentStatus(java.lang.String status)

  Sets the content status of the file

  Parameters:
    `status` - the content status of the file

### removeContentStatus

    public void removeContentStatus()

  Removes the content status of the file

### getLanguage

    public java.lang.String getLanguage()

  Gets the document language, which is normally unset and empty (or `null`).

  Returns:
    the document language

### setLanguage

    public void setLanguage(java.lang.String language)

  Set the document language

  Parameters:
    `language` - the document language

### removeLanguage

    public void removeLanguage()

  Removes the document language

### getDocumentVersion

    public java.lang.String getDocumentVersion()

  Gets the document version as a string, which is normally unset and empty (or `null`).

  Returns:
    the document verion

### setDocumentVersion

    public void setDocumentVersion(java.lang.String version)

  Sets the document version string

  Parameters:
    `version` - the document version string

### removeDocumentVersion

    public void removeDocumentVersion()

  Removes the document version string

### getCustomProperties

    public CustomProperties getCustomProperties()

  Gets the custom properties.

  Returns:
    The custom properties.

### setCustomProperties

    public void setCustomProperties(CustomProperties customProperties)

  Sets the custom properties.

  Parameters:
    `customProperties` - The custom properties

### removeCustomProperties

    public void removeCustomProperties()

  Removes the custom properties.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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