public class DocumentSummaryInformation extends SpecialPropertySet
Convenience class representing a DocumentSummary Information stream in a Microsoft Office document.
SummaryInformation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_STREAM_NAME
The document name a document summary information stream
usually has in a POIFS filesystem.
|
byteOrder, classID, format, OS_MACINTOSH, OS_WIN16, OS_WIN32, osVersion, sections
Constructor and Description |
---|
DocumentSummaryInformation(PropertySet ps)
Creates a
DocumentSummaryInformation from a given
PropertySet . |
Modifier and Type | Method and Description |
---|---|
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.
|
addSection, clearSections, equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyBooleanValue, getPropertyIntValue, getPropertyStringValue, getPropertyStringValue, getSectionCount, getSections, hashCode, isDocumentSummaryInformation, isSummaryInformation, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write
getSingleSection, isPropertySetStream, isPropertySetStream
public static final java.lang.String DEFAULT_STREAM_NAME
The document name a document summary information stream usually has in a POIFS filesystem.
public DocumentSummaryInformation(PropertySet ps) throws UnexpectedPropertySetTypeException
Creates a DocumentSummaryInformation
from a given
PropertySet
.
ps
- A property set which should be created from a
document summary information stream.UnexpectedPropertySetTypeException
- if ps
does not contain a document summary information stream.public PropertyIDMap getPropertySetIDMap()
SpecialPropertySet
getPropertySetIDMap
in class SpecialPropertySet
public java.lang.String getCategory()
Returns the category (or null
).
public void setCategory(java.lang.String category)
Sets the category.
category
- The category to set.public void removeCategory()
Removes the category.
public java.lang.String getPresentationFormat()
Returns the presentation format (or
null
).
public void setPresentationFormat(java.lang.String presentationFormat)
Sets the presentation format.
presentationFormat
- The presentation format to set.public void removePresentationFormat()
Removes the presentation format.
public int getByteCount()
Returns the byte count or 0 if the DocumentSummaryInformation
does not contain a byte count.
public void setByteCount(int byteCount)
Sets the byte count.
byteCount
- The byte count to set.public void removeByteCount()
Removes the byte count.
public int getLineCount()
Returns the line count or 0 if the DocumentSummaryInformation
does not contain a line count.
public void setLineCount(int lineCount)
Sets the line count.
lineCount
- The line count to set.public void removeLineCount()
Removes the line count.
public int getParCount()
Returns the par count or 0 if the DocumentSummaryInformation
does not contain a par count.
public void setParCount(int parCount)
Sets the par count.
parCount
- The par count to set.public void removeParCount()
Removes the par count.
public int getSlideCount()
Returns the slide count or 0 if the DocumentSummaryInformation
does not contain a slide count.
public void setSlideCount(int slideCount)
Sets the slideCount.
slideCount
- The slide count to set.public void removeSlideCount()
Removes the slide count.
public int getNoteCount()
Returns the note count or 0 if the DocumentSummaryInformation
does not contain a note count.
public void setNoteCount(int noteCount)
Sets the note count.
noteCount
- The note count to set.public void removeNoteCount()
Removes the noteCount.
public int getHiddenCount()
Returns the hidden count or 0 if the DocumentSummaryInformation
does not contain a hidden
count.
public void setHiddenCount(int hiddenCount)
Sets the hidden count.
hiddenCount
- The hidden count to set.public void removeHiddenCount()
Removes the hidden count.
public int getMMClipCount()
Returns the mmclip count or 0 if the DocumentSummaryInformation
does not contain a mmclip
count.
public void setMMClipCount(int mmClipCount)
Sets the mmclip count.
mmClipCount
- The mmclip count to set.public void removeMMClipCount()
Removes the mmclip count.
public boolean getScale()
Returns true
when scaling of the thumbnail is
desired, false
if cropping is desired.
public void setScale(boolean scale)
Sets the scale.
scale
- The scale to set.public void removeScale()
Removes the scale.
public byte[] getHeadingPair()
Returns the heading pair (or null
)
when this method is implemented. Please note that the
return type is likely to change!
public void setHeadingPair(byte[] headingPair)
Sets the heading pair.
headingPair
- The heading pair to set.public void removeHeadingPair()
Removes the heading pair.
public byte[] getDocparts()
Returns the doc parts (or null
)
when this method is implemented. Please note that the
return type is likely to change!
public void setDocparts(byte[] docparts)
Sets the doc parts.
docparts
- The doc parts to set.public void removeDocparts()
Removes the doc parts.
public java.lang.String getManager()
Returns the manager (or null
).
public void setManager(java.lang.String manager)
Sets the manager.
manager
- The manager to set.public void removeManager()
Removes the manager.
public java.lang.String getCompany()
Returns the company (or null
).
public void setCompany(java.lang.String company)
Sets the company.
company
- The company to set.public void removeCompany()
Removes the company.
public boolean getLinksDirty()
Returns true
if the custom links are dirty.
public void setLinksDirty(boolean linksDirty)
Sets the linksDirty.
linksDirty
- The links dirty value to set.public void removeLinksDirty()
Removes the links dirty.
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()
null
public void setCharCountWithSpaces(int count)
count
- The character count to set.public void removeCharCountWithSpaces()
public boolean getHyperlinksChanged()
If it has (true), the hyperlinks should be updated on document load.
public void setHyperlinksChanged(boolean changed)
changed
- true, if the User Defined Property Set has been updatedpublic void removeHyperlinksChanged()
public int getApplicationVersion()
This will be 0 if no version is set.
public void setApplicationVersion(int version)
version
- the Application versionpublic void removeApplicationVersion()
public byte[] getVBADigitalSignature()
null
).public void setVBADigitalSignature(byte[] signature)
Sets the VBA digital signature for the VBA project embedded in the document.
signature
- VBA Digital Signature for the projectpublic void removeVBADigitalSignature()
public java.lang.String getContentType()
null
).public void setContentType(java.lang.String type)
type
- the content type of the filepublic void removeContentType()
public java.lang.String getContentStatus()
null
).public void setContentStatus(java.lang.String status)
status
- the content status of the filepublic void removeContentStatus()
public java.lang.String getLanguage()
null
).public void setLanguage(java.lang.String language)
language
- the document languagepublic void removeLanguage()
public java.lang.String getDocumentVersion()
Gets the document version as a string, which is normally unset and empty
(or null
).
public void setDocumentVersion(java.lang.String version)
version
- the document version stringpublic void removeDocumentVersion()
public CustomProperties getCustomProperties()
Gets the custom properties.
public void setCustomProperties(CustomProperties customProperties)
Sets the custom properties.
customProperties
- The custom propertiespublic void removeCustomProperties()
Removes the custom properties.
Copyright 2017 The Apache Software Foundation or its licensors, as applicable.