Top Description Fields Constructors Methods
org.apache.poi.hpsf

public Class DocumentSummaryInformation

extends PropertySet
Class Inheritance
Annotations
@SuppressWarnings:unused
Static Imports
org.apache.poi.hpsf.ClassIDPredefined.DOC_SUMMARY, .ClassIDPredefined.USER_PROPERTIES

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

Field Summary

Modifier and TypeField and Description
public static final String
DEFAULT_STREAM_NAME

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

public static final ClassID[]
FORMAT_ID

The DocumentSummaryInformation's first and second sections' format ID.

Inherited from org.apache.poi.hpsf.PropertySet:
BYTE_ORDER_ASSERTIONFORMAT_ASSERTIONOFFSET_HEADEROS_MACINTOSHOS_WIN16OS_WIN32

Constructor Summary

AccessConstructor and Description
public
public
DocumentSummaryInformation(final PropertySet
A property set which should be created from a document summary information stream.
ps
)

Creates a DocumentSummaryInformation from a given PropertySet.

public
DocumentSummaryInformation(final InputStream
Holds the data making out the property set stream.
stream
)

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

Method Summary

Modifier and TypeMethod and Description
private void
ensureSection2()

Creates section 2 if it is not already present.

public int

Returns:

the Application version
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.

public int

Returns:

The byteCount value
getByteCount
()

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

public String

Returns:

The category value
getCategory
()

Returns the category (or null).

public int

Returns:

The character count or null
getCharCountWithSpaces
()

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

public String

Returns:

The company value
getCompany
()

Returns the company (or null).

public String

Returns:

the content status of the file
getContentStatus
()

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

public String

Returns:

the content type of the file
getContentType
()

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

public CustomProperties

Returns:

The custom properties.
getCustomProperties
()

Gets the custom properties.

public byte[]

Returns:

The doc parts value
getDocparts
()

Returns the doc parts (or null) when this method is implemented.

public String

Returns:

the document verion
getDocumentVersion
()

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

public byte[]

Returns:

The heading pair value
getHeadingPair
()

Returns the heading pair (or null) when this method is implemented.

public int

Returns:

The hidden count value
getHiddenCount
()

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

public boolean

Returns:

true, if the hyperlinks should be updated on document load
getHyperlinksChanged
()

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

public String

Returns:

the document language
getLanguage
()

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

public int

Returns:

The line count value
getLineCount
()

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

public boolean

Returns:

The links dirty value
getLinksDirty
()

Returns true if the custom links are dirty.

public String

Returns:

The manager value
getManager
()

Returns the manager (or null).

public int

Returns:

The mmclip count value
getMMClipCount
()

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

public int

Returns:

The note count value
getNoteCount
()

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

public int

Returns:

The par count value
getParCount
()

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

public String

Returns:

The presentation format value
getPresentationFormat
()

Returns the presentation format (or null).

public PropertyIDMap
getPropertySetIDMap()

Overrides org.apache.poi.hpsf.PropertySet.getPropertySetIDMap.

The id to name mapping of the properties in this set.

public boolean

Returns:

The scale value
getScale
()

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

public int

Returns:

The slide count value
getSlideCount
()

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

public byte[]

Returns:

the VBA digital signature
getVBADigitalSignature
()

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

private void
notYetImplemented(final String
text telling was leaves to be implemented, e.g. "Reading byte arrays".
msg
)

Throws an UnsupportedOperationException with a message text telling which functionality is not yet implemented.

public void
removeApplicationVersion()

Removes the Application Version

public void
removeByteCount()

Removes the byte count.

public void
removeCategory()

Removes the category.

public void
removeCharCountWithSpaces()

Removes the character count

public void
removeCompany()

Removes the company.

public void
removeContentStatus()

Removes the content status of the file

public void
removeContentType()

Removes the content type of the file

public void
removeCustomProperties()

Removes the custom properties.

public void
removeDocparts()

Removes the doc parts.

public void
removeDocumentVersion()

Removes the document version string

public void
removeHeadingPair()

Removes the heading pair.

public void
removeHiddenCount()

Removes the hidden count.

public void
removeHyperlinksChanged()

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

public void
removeLanguage()

Removes the document language

public void
removeLineCount()

Removes the line count.

public void
removeLinksDirty()

Removes the links dirty.

public void
removeManager()

Removes the manager.

public void
removeMMClipCount()

Removes the mmclip count.

public void
removeNoteCount()

Removes the noteCount.

public void
removeParCount()

Removes the par count.

public void
removePresentationFormat()

Removes the presentation format.

public void
removeScale()

Removes the scale.

public void
removeSlideCount()

Removes the slide count.

public void
removeVBADigitalSignature()

Removes the VBA Digital Signature

public void
setApplicationVersion(int
the Application version
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.

public void
setByteCount(final int
The byte count to set.
byteCount
)

Sets the byte count.

public void
setCategory(final String
The category to set.
category
)

Sets the category.

public void
setCharCountWithSpaces(int
The character count to set.
count
)

Sets the character count including whitespace

public void
setCompany(final String
The company to set.
company
)

Sets the company.

public void
setContentStatus(String
the content status of the file
status
)

Sets the content status of the file

public void
setContentType(String
the content type of the file
type
)

Sets the content type of the file

public void
setCustomProperties(final CustomProperties
The custom properties
customProperties
)

Sets the custom properties.

public void
setDocparts(final byte[]
The doc parts to set.
docparts
)

Sets the doc parts.

public void
setDocumentVersion(String
the document version string
version
)

Sets the document version string

public void
setHeadingPair(final byte[]
The heading pair to set.
headingPair
)

Sets the heading pair.

public void
setHiddenCount(final int
The hidden count to set.
hiddenCount
)

Sets the hidden count.

public void
setHyperlinksChanged(boolean
true, if the User Defined Property Set has been updated
changed
)

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

public void
setLanguage(String
the document language
language
)

Set the document language

public void
setLineCount(final int
The line count to set.
lineCount
)

Sets the line count.

public void
setLinksDirty(final boolean
The links dirty value to set.
linksDirty
)

Sets the linksDirty.

public void
setManager(final String
The manager to set.
manager
)

Sets the manager.

public void
setMMClipCount(final int
The mmclip count to set.
mmClipCount
)

Sets the mmclip count.

public void
setNoteCount(final int
The note count to set.
noteCount
)

Sets the note count.

public void
setParCount(final int
The par count to set.
parCount
)

Sets the par count.

public void
setPresentationFormat(final String
The presentation format to set.
presentationFormat
)

Sets the presentation format.

public void
setScale(final boolean
The scale to set.
scale
)

Sets the scale.

public void
setSlideCount(final int
The slide count to set.
slideCount
)

Sets the slideCount.

public void
setVBADigitalSignature(byte[]
VBA Digital Signature for the project
signature
)

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

Inherited from org.apache.poi.hpsf.PropertySet:
addSectionclearSectionsequalsgetByteOrdergetClassIDgetFirstSectiongetFormatgetOSVersiongetPropertiesgetPropertygetPropertyBooleanValuegetPropertyIntValuegetPropertyStringValuegetPropertyStringValuegetSectionCountgetSectionshashCodeisDocumentSummaryInformationisPropertySetStreamisPropertySetStreamisSummaryInformationmatchesSummaryremove1stPropertyset1stPropertyset1stPropertyset1stPropertyset1stPropertysetByteOrdersetClassIDsetFormatsetOSVersiontoInputStreamtoStringwasNullwritewrite

Field Detail

DEFAULT_STREAM_NAMEback to summary
public static final String DEFAULT_STREAM_NAME

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

FORMAT_IDback to summary
public static final ClassID[] FORMAT_ID

The DocumentSummaryInformation's first and second sections' format ID.

Constructor Detail

DocumentSummaryInformationback to summary
public DocumentSummaryInformation()

Creates an empty DocumentSummaryInformation.

DocumentSummaryInformationback to summary
public DocumentSummaryInformation(final PropertySet ps) throws UnexpectedPropertySetTypeException

Creates a DocumentSummaryInformation from a given PropertySet.

Parameters
ps:PropertySet

A property set which should be created from a document summary information stream.

Exceptions
UnexpectedPropertySetTypeException:
if ps does not contain a document summary information stream.
DocumentSummaryInformationback to summary
public DocumentSummaryInformation(final InputStream stream) throws NoPropertySetStreamException, IOException

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:InputStream

Holds the data making out the property set stream.

Exceptions
NoPropertySetStreamException:
if the input stream does not contain a property set.
IOException:
if the InputStream cannot be accessed as needed.

Method Detail

ensureSection2back to summary
private void ensureSection2()

Creates section 2 if it is not already present.

getApplicationVersionback to summary
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:int

the Application version

getByteCountback to summary
public int getByteCount()

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

Returns:int

The byteCount value

getCategoryback to summary
public String getCategory()

Returns the category (or null).

Returns:String

The category value

getCharCountWithSpacesback to summary
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:int

The character count or null

getCompanyback to summary
public String getCompany()

Returns the company (or null).

Returns:String

The company value

getContentStatusback to summary
public String getContentStatus()

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

Returns:String

the content status of the file

getContentTypeback to summary
public String getContentType()

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

Returns:String

the content type of the file

getCustomPropertiesback to summary
public CustomProperties getCustomProperties()

Gets the custom properties.

Returns:CustomProperties

The custom properties.

getDocpartsback to summary
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:byte[]

The doc parts value

getDocumentVersionback to summary
public String getDocumentVersion()

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

Returns:String

the document verion

getHeadingPairback to summary
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:byte[]

The heading pair value

getHiddenCountback to summary
public int getHiddenCount()

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

Returns:int

The hidden count value

getHyperlinksChangedback to summary
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:boolean

true, if the hyperlinks should be updated on document load

getLanguageback to summary
public String getLanguage()

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

Returns:String

the document language

getLineCountback to summary
public int getLineCount()

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

Returns:int

The line count value

getLinksDirtyback to summary
public boolean getLinksDirty()

Returns true if the custom links are dirty.

Returns:boolean

The links dirty value

getManagerback to summary
public String getManager()

Returns the manager (or null).

Returns:String

The manager value

getMMClipCountback to summary
public int getMMClipCount()

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

Returns:int

The mmclip count value

getNoteCountback to summary
public int getNoteCount()

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

Returns:int

The note count value

getParCountback to summary
public int getParCount()

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

Returns:int

The par count value

getPresentationFormatback to summary
public String getPresentationFormat()

Returns the presentation format (or null).

Returns:String

The presentation format value

getPropertySetIDMapback to summary
public PropertyIDMap getPropertySetIDMap()

Overrides org.apache.poi.hpsf.PropertySet.getPropertySetIDMap.

Doc from org.apache.poi.hpsf.PropertySet.getPropertySetIDMap.

The id to name mapping of the properties in this set.

Returns:PropertyIDMap

the id to name mapping of the properties in this set or null if not applicable

Annotations
@Override
getScaleback to summary
public boolean getScale()

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

Returns:boolean

The scale value

getSlideCountback to summary
public int getSlideCount()

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

Returns:int

The slide count value

getVBADigitalSignatureback to summary
public byte[] getVBADigitalSignature()

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

Returns:byte[]

the VBA digital signature

notYetImplementedback to summary
private void notYetImplemented(final String msg)

Throws an UnsupportedOperationException with a message text telling which functionality is not yet implemented.

Parameters
msg:String

text telling was leaves to be implemented, e.g. "Reading byte arrays".

removeApplicationVersionback to summary
public void removeApplicationVersion()

Removes the Application Version

removeByteCountback to summary
public void removeByteCount()

Removes the byte count.

removeCategoryback to summary
public void removeCategory()

Removes the category.

removeCharCountWithSpacesback to summary
public void removeCharCountWithSpaces()

Removes the character count

removeCompanyback to summary
public void removeCompany()

Removes the company.

removeContentStatusback to summary
public void removeContentStatus()

Removes the content status of the file

removeContentTypeback to summary
public void removeContentType()

Removes the content type of the file

removeCustomPropertiesback to summary
public void removeCustomProperties()

Removes the custom properties.

removeDocpartsback to summary
public void removeDocparts()

Removes the doc parts.

removeDocumentVersionback to summary
public void removeDocumentVersion()

Removes the document version string

removeHeadingPairback to summary
public void removeHeadingPair()

Removes the heading pair.

removeHiddenCountback to summary
public void removeHiddenCount()

Removes the hidden count.

removeHyperlinksChangedback to summary
public void removeHyperlinksChanged()

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

removeLanguageback to summary
public void removeLanguage()

Removes the document language

removeLineCountback to summary
public void removeLineCount()

Removes the line count.

removeLinksDirtyback to summary
public void removeLinksDirty()

Removes the links dirty.

removeManagerback to summary
public void removeManager()

Removes the manager.

removeMMClipCountback to summary
public void removeMMClipCount()

Removes the mmclip count.

removeNoteCountback to summary
public void removeNoteCount()

Removes the noteCount.

removeParCountback to summary
public void removeParCount()

Removes the par count.

removePresentationFormatback to summary
public void removePresentationFormat()

Removes the presentation format.

removeScaleback to summary
public void removeScale()

Removes the scale.

removeSlideCountback to summary
public void removeSlideCount()

Removes the slide count.

removeVBADigitalSignatureback to summary
public void removeVBADigitalSignature()

Removes the VBA Digital Signature

setApplicationVersionback to summary
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:int

the Application version

setByteCountback to summary
public void setByteCount(final int byteCount)

Sets the byte count.

Parameters
byteCount:int

The byte count to set.

setCategoryback to summary
public void setCategory(final String category)

Sets the category.

Parameters
category:String

The category to set.

setCharCountWithSpacesback to summary
public void setCharCountWithSpaces(int count)

Sets the character count including whitespace

Parameters
count:int

The character count to set.

setCompanyback to summary
public void setCompany(final String company)

Sets the company.

Parameters
company:String

The company to set.

setContentStatusback to summary
public void setContentStatus(String status)

Sets the content status of the file

Parameters
status:String

the content status of the file

setContentTypeback to summary
public void setContentType(String type)

Sets the content type of the file

Parameters
type:String

the content type of the file

setCustomPropertiesback to summary
public void setCustomProperties(final CustomProperties customProperties)

Sets the custom properties.

Parameters
customProperties:CustomProperties

The custom properties

setDocpartsback to summary
public void setDocparts(final byte[] docparts)

Sets the doc parts.

Parameters
docparts:byte[]

The doc parts to set.

setDocumentVersionback to summary
public void setDocumentVersion(String version)

Sets the document version string

Parameters
version:String

the document version string

setHeadingPairback to summary
public void setHeadingPair(final byte[] headingPair)

Sets the heading pair.

Parameters
headingPair:byte[]

The heading pair to set.

setHiddenCountback to summary
public void setHiddenCount(final int hiddenCount)

Sets the hidden count.

Parameters
hiddenCount:int

The hidden count to set.

setHyperlinksChangedback to summary
public void setHyperlinksChanged(boolean changed)

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

Parameters
changed:boolean

true, if the User Defined Property Set has been updated

setLanguageback to summary
public void setLanguage(String language)

Set the document language

Parameters
language:String

the document language

setLineCountback to summary
public void setLineCount(final int lineCount)

Sets the line count.

Parameters
lineCount:int

The line count to set.

setLinksDirtyback to summary
public void setLinksDirty(final boolean linksDirty)

Sets the linksDirty.

Parameters
linksDirty:boolean

The links dirty value to set.

setManagerback to summary
public void setManager(final String manager)

Sets the manager.

Parameters
manager:String

The manager to set.

setMMClipCountback to summary
public void setMMClipCount(final int mmClipCount)

Sets the mmclip count.

Parameters
mmClipCount:int

The mmclip count to set.

setNoteCountback to summary
public void setNoteCount(final int noteCount)

Sets the note count.

Parameters
noteCount:int

The note count to set.

setParCountback to summary
public void setParCount(final int parCount)

Sets the par count.

Parameters
parCount:int

The par count to set.

setPresentationFormatback to summary
public void setPresentationFormat(final String presentationFormat)

Sets the presentation format.

Parameters
presentationFormat:String

The presentation format to set.

setScaleback to summary
public void setScale(final boolean scale)

Sets the scale.

Parameters
scale:boolean

The scale to set.

setSlideCountback to summary
public void setSlideCount(final int slideCount)

Sets the slideCount.

Parameters
slideCount:int

The slide count to set.

setVBADigitalSignatureback to summary
public void setVBADigitalSignature(byte[] signature)

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

Parameters
signature:byte[]

VBA Digital Signature for the project