public final class SummaryInformation extends SpecialPropertySet
Convenience class representing a Summary Information stream in a Microsoft Office document.
DocumentSummaryInformation
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_STREAM_NAME
The document name a summary information stream usually has in a POIFS
filesystem.
|
byteOrder, classID, format, OS_MACINTOSH, OS_WIN16, OS_WIN32, osVersion, sections
Constructor and Description |
---|
SummaryInformation(PropertySet ps)
Creates a
SummaryInformation from a given PropertySet . |
Modifier and Type | Method and Description |
---|---|
String |
getApplicationName()
Returns the application name (or
null ). |
String |
getAuthor()
Returns the author (or
null ). |
int |
getCharCount()
Returns the character count or 0 if the
SummaryInformation
does not contain a char count. |
String |
getComments()
Returns the comments (or
null ). |
Date |
getCreateDateTime()
Returns the creation time (or
null ). |
long |
getEditTime()
Returns the total time spent in editing the document (or
0 ). |
String |
getKeywords()
Returns the keywords (or
null ). |
String |
getLastAuthor()
Returns the last author (or
null ). |
Date |
getLastPrinted()
Returns the last printed time (or
null ). |
Date |
getLastSaveDateTime()
Returns the last save time (or
null ). |
int |
getPageCount()
Returns the page count or 0 if the
SummaryInformation does
not contain a page count. |
PropertyIDMap |
getPropertySetIDMap()
The id to name mapping of the properties
in this set.
|
String |
getRevNumber()
Returns the revision number (or
null ). |
int |
getSecurity()
Returns a security code which is one of the following values:
|
String |
getSubject()
Returns the subject (or
null ). |
String |
getTemplate()
Returns the template (or
null ). |
byte[] |
getThumbnail()
Returns the thumbnail (or
null ) when this
method is implemented. |
String |
getTitle()
Returns the title (or
null ). |
int |
getWordCount()
Returns the word count or 0 if the
SummaryInformation does
not contain a word count. |
void |
removeApplicationName()
Removes the application name.
|
void |
removeAuthor()
Removes the author.
|
void |
removeCharCount()
Removes the character count.
|
void |
removeComments()
Removes the comments.
|
void |
removeCreateDateTime()
Removes the creation time.
|
void |
removeEditTime()
Remove the total time spent in editing the document.
|
void |
removeKeywords()
Removes the keywords.
|
void |
removeLastAuthor()
Removes the last author.
|
void |
removeLastPrinted()
Removes the lastPrinted.
|
void |
removeLastSaveDateTime()
Remove the total time spent in editing the document.
|
void |
removePageCount()
Removes the page count.
|
void |
removeRevNumber()
Removes the revision number.
|
void |
removeSecurity()
Removes the security code.
|
void |
removeSubject()
Removes the subject.
|
void |
removeTemplate()
Removes the template.
|
void |
removeThumbnail()
Removes the thumbnail.
|
void |
removeTitle()
Removes the title.
|
void |
removeWordCount()
Removes the word count.
|
void |
setApplicationName(String applicationName)
Sets the application name.
|
void |
setAuthor(String author)
Sets the author.
|
void |
setCharCount(int charCount)
Sets the character count.
|
void |
setComments(String comments)
Sets the comments.
|
void |
setCreateDateTime(Date createDateTime)
Sets the creation time.
|
void |
setEditTime(long time)
Sets the total time spent in editing the document.
|
void |
setKeywords(String keywords)
Sets the keywords.
|
void |
setLastAuthor(String lastAuthor)
Sets the last author.
|
void |
setLastPrinted(Date lastPrinted)
Sets the lastPrinted.
|
void |
setLastSaveDateTime(Date time)
Sets the total time spent in editing the document.
|
void |
setPageCount(int pageCount)
Sets the page count.
|
void |
setRevNumber(String revNumber)
Sets the revision number.
|
void |
setSecurity(int security)
Sets the security code.
|
void |
setSubject(String subject)
Sets the subject.
|
void |
setTemplate(String template)
Sets the template.
|
void |
setThumbnail(byte[] thumbnail)
Sets the thumbnail.
|
void |
setTitle(String title)
Sets the title.
|
void |
setWordCount(int wordCount)
Sets the word count.
|
addSection, clearSections, equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyBooleanValue, getPropertyIntValue, getSectionCount, getSections, hashCode, isDocumentSummaryInformation, isSummaryInformation, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write
getSingleSection, isPropertySetStream, isPropertySetStream
public static final String DEFAULT_STREAM_NAME
The document name a summary information stream usually has in a POIFS filesystem.
public SummaryInformation(PropertySet ps) throws UnexpectedPropertySetTypeException
Creates a SummaryInformation
from a given PropertySet
.
ps
- A property set which should be created from a summary
information stream.UnexpectedPropertySetTypeException
- if ps does not
contain a summary information stream.public PropertyIDMap getPropertySetIDMap()
SpecialPropertySet
getPropertySetIDMap
in class SpecialPropertySet
public String getTitle()
Returns the title (or null
).
null
public void setTitle(String title)
Sets the title.
title
- The title to set.public void removeTitle()
Removes the title.
public String getSubject()
Returns the subject (or null
).
null
public void setSubject(String subject)
Sets the subject.
subject
- The subject to set.public void removeSubject()
Removes the subject.
public String getAuthor()
Returns the author (or null
).
null
public void setAuthor(String author)
Sets the author.
author
- The author to set.public void removeAuthor()
Removes the author.
public String getKeywords()
Returns the keywords (or null
).
null
public void setKeywords(String keywords)
Sets the keywords.
keywords
- The keywords to set.public void removeKeywords()
Removes the keywords.
public String getComments()
Returns the comments (or null
).
null
public void setComments(String comments)
Sets the comments.
comments
- The comments to set.public void removeComments()
Removes the comments.
public String getTemplate()
Returns the template (or null
).
null
public void setTemplate(String template)
Sets the template.
template
- The template to set.public void removeTemplate()
Removes the template.
public String getLastAuthor()
Returns the last author (or null
).
null
public void setLastAuthor(String lastAuthor)
Sets the last author.
lastAuthor
- The last author to set.public void removeLastAuthor()
Removes the last author.
public String getRevNumber()
Returns the revision number (or null
).
null
public void setRevNumber(String revNumber)
Sets the revision number.
revNumber
- The revision number to set.public void removeRevNumber()
Removes the revision number.
public long getEditTime()
Returns the total time spent in editing the document (or
0
).
SummaryInformation
does not contain this information.public void setEditTime(long time)
Sets the total time spent in editing the document.
time
- The time to set.public void removeEditTime()
Remove the total time spent in editing the document.
public Date getLastPrinted()
Returns the last printed time (or null
).
null
public void setLastPrinted(Date lastPrinted)
Sets the lastPrinted.
lastPrinted
- The lastPrinted to set.public void removeLastPrinted()
Removes the lastPrinted.
public Date getCreateDateTime()
Returns the creation time (or null
).
null
public void setCreateDateTime(Date createDateTime)
Sets the creation time.
createDateTime
- The creation time to set.public void removeCreateDateTime()
Removes the creation time.
public Date getLastSaveDateTime()
Returns the last save time (or null
).
null
public void setLastSaveDateTime(Date time)
Sets the total time spent in editing the document.
time
- The time to set.public void removeLastSaveDateTime()
Remove the total time spent in editing the document.
public int getPageCount()
Returns the page count or 0 if the SummaryInformation
does
not contain a page count.
SummaryInformation
does not
contain a page count.public void setPageCount(int pageCount)
Sets the page count.
pageCount
- The page count to set.public void removePageCount()
Removes the page count.
public int getWordCount()
Returns the word count or 0 if the SummaryInformation
does
not contain a word count.
null
public void setWordCount(int wordCount)
Sets the word count.
wordCount
- The word count to set.public void removeWordCount()
Removes the word count.
public int getCharCount()
Returns the character count or 0 if the SummaryInformation
does not contain a char count.
null
public void setCharCount(int charCount)
Sets the character count.
charCount
- The character count to set.public void removeCharCount()
Removes the character count.
public byte[] getThumbnail()
Returns the thumbnail (or null
) when this
method is implemented. Please note that the return type is likely to
change!
Hint to developers: Drew Varner <Drew.Varner -at- sc.edu> said that this is an image in WMF or Clipboard (BMP?) format. However, we won't do any conversion into any image type but instead just return a byte array.
null
public void setThumbnail(byte[] thumbnail)
Sets the thumbnail.
thumbnail
- The thumbnail to set.public void removeThumbnail()
Removes the thumbnail.
public String getApplicationName()
Returns the application name (or null
).
null
public void setApplicationName(String applicationName)
Sets the application name.
applicationName
- The application name to set.public void removeApplicationName()
Removes the application name.
public int getSecurity()
Returns a security code which is one of the following values:
0 if the SummaryInformation
does not contain a
security field or if there is no security on the document. Use
PropertySet.wasNull()
to distinguish between the two
cases!
1 if the document is password protected
2 if the document is read-only recommended
4 if the document is read-only enforced
8 if the document is locked for annotations
null
public void setSecurity(int security)
Sets the security code.
security
- The security code to set.public void removeSecurity()
Removes the security code.
Copyright © 2020. All rights reserved.