public class SummaryInformation extends SpecialPropertySet
Convenience class representing a Summary Information stream in a Microsoft Office document.
DocumentSummaryInformation
Modifier and Type | Field and Description |
---|---|
static java.lang.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 |
---|---|
java.lang.String |
getApplicationName()
Returns the application name (or
null ). |
java.lang.String |
getAuthor()
Returns the author (or
null ). |
int |
getCharCount()
Returns the character count or 0 if the
SummaryInformation
does not contain a char count. |
java.lang.String |
getComments()
Returns the comments (or
null ). |
java.util.Date |
getCreateDateTime()
Returns the creation time (or
null ). |
long |
getEditTime()
Returns the total time spent in editing the document (or
0 ). |
java.lang.String |
getKeywords()
Returns the keywords (or
null ). |
java.lang.String |
getLastAuthor()
Returns the last author (or
null ). |
java.util.Date |
getLastPrinted()
Returns the last printed time (or
null ). |
java.util.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. |
java.lang.String |
getRevNumber()
Returns the revision number (or
null ). |
int |
getSecurity()
Returns a security code which is one of the following values:
|
java.lang.String |
getSubject()
Returns the subject (or
null ). |
java.lang.String |
getTemplate()
Returns the template (or
null ). |
byte[] |
getThumbnail()
Returns the thumbnail (or
null ) when this
method is implemented. |
java.lang.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(java.lang.String applicationName)
Sets the application name.
|
void |
setAuthor(java.lang.String author)
Sets the author.
|
void |
setCharCount(int charCount)
Sets the character count.
|
void |
setComments(java.lang.String comments)
Sets the comments.
|
void |
setCreateDateTime(java.util.Date createDateTime)
Sets the creation time.
|
void |
setEditTime(long time)
Sets the total time spent in editing the document.
|
void |
setKeywords(java.lang.String keywords)
Sets the keywords.
|
void |
setLastAuthor(java.lang.String lastAuthor)
Sets the last author.
|
void |
setLastPrinted(java.util.Date lastPrinted)
Sets the lastPrinted.
|
void |
setLastSaveDateTime(java.util.Date time)
Sets the total time spent in editing the document.
|
void |
setPageCount(int pageCount)
Sets the page count.
|
void |
setRevNumber(java.lang.String revNumber)
Sets the revision number.
|
void |
setSecurity(int security)
Sets the security code.
|
void |
setSubject(java.lang.String subject)
Sets the subject.
|
void |
setTemplate(java.lang.String template)
Sets the template.
|
void |
setThumbnail(byte[] thumbnail)
Sets the thumbnail.
|
void |
setTitle(java.lang.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 java.lang.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 java.lang.String getTitle()
Returns the title (or null
).
null
public void setTitle(java.lang.String title)
Sets the title.
title
- The title to set.public void removeTitle()
Removes the title.
public java.lang.String getSubject()
Returns the subject (or null
).
null
public void setSubject(java.lang.String subject)
Sets the subject.
subject
- The subject to set.public void removeSubject()
Removes the subject.
public java.lang.String getAuthor()
Returns the author (or null
).
null
public void setAuthor(java.lang.String author)
Sets the author.
author
- The author to set.public void removeAuthor()
Removes the author.
public java.lang.String getKeywords()
Returns the keywords (or null
).
null
public void setKeywords(java.lang.String keywords)
Sets the keywords.
keywords
- The keywords to set.public void removeKeywords()
Removes the keywords.
public java.lang.String getComments()
Returns the comments (or null
).
null
public void setComments(java.lang.String comments)
Sets the comments.
comments
- The comments to set.public void removeComments()
Removes the comments.
public java.lang.String getTemplate()
Returns the template (or null
).
null
public void setTemplate(java.lang.String template)
Sets the template.
template
- The template to set.public void removeTemplate()
Removes the template.
public java.lang.String getLastAuthor()
Returns the last author (or null
).
null
public void setLastAuthor(java.lang.String lastAuthor)
Sets the last author.
lastAuthor
- The last author to set.public void removeLastAuthor()
Removes the last author.
public java.lang.String getRevNumber()
Returns the revision number (or null
).
null
public void setRevNumber(java.lang.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 java.util.Date getLastPrinted()
Returns the last printed time (or null
).
null
public void setLastPrinted(java.util.Date lastPrinted)
Sets the lastPrinted.
lastPrinted
- The lastPrinted to set.public void removeLastPrinted()
Removes the lastPrinted.
public java.util.Date getCreateDateTime()
Returns the creation time (or null
).
null
public void setCreateDateTime(java.util.Date createDateTime)
Sets the creation time.
createDateTime
- The creation time to set.public void removeCreateDateTime()
Removes the creation time.
public java.util.Date getLastSaveDateTime()
Returns the last save time (or null
).
null
public void setLastSaveDateTime(java.util.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 java.lang.String getApplicationName()
Returns the application name (or null
).
null
public void setApplicationName(java.lang.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 © 2014 Open Microscopy Environment