public class DocumentSummaryInformation extends PropertySet
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.
|
static ClassID[] |
FORMAT_ID
The DocumentSummaryInformation's first and second sections' format ID.
|
OS_MACINTOSH, OS_WIN16, OS_WIN32
Constructor and Description |
---|
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 . |
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, getPropertyStringValue, getSectionCount, getSections, hashCode, isDocumentSummaryInformation, isPropertySetStream, isPropertySetStream, isSummaryInformation, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write
public static final java.lang.String DEFAULT_STREAM_NAME
public static final ClassID[] FORMAT_ID
public DocumentSummaryInformation()
DocumentSummaryInformation
.public DocumentSummaryInformation(PropertySet ps) throws UnexpectedPropertySetTypeException
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 DocumentSummaryInformation(java.io.InputStream stream) throws NoPropertySetStreamException, java.io.IOException
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.
stream
- Holds the data making out the property set
stream.java.io.IOException
- if the InputStream
cannot be accessed as needed.NoPropertySetStreamException
- if the input stream does not contain a property set.public PropertyIDMap getPropertySetIDMap()
PropertySet
getPropertySetIDMap
in class PropertySet
null
if not applicablepublic java.lang.String getCategory()
null
).public void setCategory(java.lang.String category)
category
- The category to set.public void removeCategory()
public java.lang.String getPresentationFormat()
null
).public void setPresentationFormat(java.lang.String presentationFormat)
presentationFormat
- The presentation format to set.public void removePresentationFormat()
public int getByteCount()
DocumentSummaryInformation
does not contain a byte count.public void setByteCount(int byteCount)
byteCount
- The byte count to set.public void removeByteCount()
public int getLineCount()
DocumentSummaryInformation
does not contain a line count.public void setLineCount(int lineCount)
lineCount
- The line count to set.public void removeLineCount()
public int getParCount()
DocumentSummaryInformation
does not contain a par count.public void setParCount(int parCount)
parCount
- The par count to set.public void removeParCount()
public int getSlideCount()
DocumentSummaryInformation
does not contain a slide count.public void setSlideCount(int slideCount)
slideCount
- The slide count to set.public void removeSlideCount()
public int getNoteCount()
DocumentSummaryInformation
does not contain a note count.public void setNoteCount(int noteCount)
noteCount
- The note count to set.public void removeNoteCount()
public int getHiddenCount()
DocumentSummaryInformation
does not contain a hidden
count.public void setHiddenCount(int hiddenCount)
hiddenCount
- The hidden count to set.public void removeHiddenCount()
public int getMMClipCount()
DocumentSummaryInformation
does not contain a mmclip
count.public void setMMClipCount(int mmClipCount)
mmClipCount
- The mmclip count to set.public void removeMMClipCount()
public boolean getScale()
true
when scaling of the thumbnail is
desired, false
if cropping is desired.public void setScale(boolean scale)
scale
- The scale to set.public void removeScale()
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)
headingPair
- The heading pair to set.public void removeHeadingPair()
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)
docparts
- The doc parts to set.public void removeDocparts()
public java.lang.String getManager()
null
).public void setManager(java.lang.String manager)
manager
- The manager to set.public void removeManager()
public java.lang.String getCompany()
null
).public void setCompany(java.lang.String company)
company
- The company to set.public void removeCompany()
public boolean getLinksDirty()
true
if the custom links are dirty. public void setLinksDirty(boolean linksDirty)
linksDirty
- The links dirty value to set.public void removeLinksDirty()
public int getCharCountWithSpaces()
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)
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()
null
).public void setDocumentVersion(java.lang.String version)
version
- the document version stringpublic void removeDocumentVersion()
public CustomProperties getCustomProperties()
public void setCustomProperties(CustomProperties customProperties)
customProperties
- The custom propertiespublic void removeCustomProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.