Class SummaryInformation
Convenience class representing a Summary Information stream in a Microsoft Office document.
- Since:
- 2002-02-09
- Version:
- $Id: SummaryInformation.java 496419 2007-01-15 17:56:52Z klute $
- Author:
- Rainer Klute <klute@rainer-klute.de>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe document name a summary information stream usually has in a POIFS filesystem.Fields inherited from class loci.poi.hpsf.PropertySet
byteOrder, classID, format, OS_MACINTOSH, OS_WIN16, OS_WIN32, osVersion, sections -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the application name (ornull).Returns the author (ornull).intReturns the character count or 0 if theSummaryInformationdoes not contain a char count.Returns the comments (ornull).Returns the creation time (ornull).longReturns the total time spent in editing the document (or0).Returns the keywords (ornull).Returns the last author (ornull).Returns the last printed time (ornull).Returns the last save time (ornull).intReturns the page count or 0 if theSummaryInformationdoes not contain a page count.Returns the revision number (ornull).intReturns a security code which is one of the following values:Returns the subject (ornull).Returns the template (ornull).byte[]Returns the thumbnail (ornull) when this method is implemented.getTitle()Returns the title (ornull).intReturns the word count or 0 if theSummaryInformationdoes not contain a word count.voidRemoves the application name.voidRemoves the author.voidRemoves the character count.voidRemoves the comments.voidRemoves the creation time.voidRemove the total time spent in editing the document.voidRemoves the keywords.voidRemoves the last author.voidRemoves the lastPrinted.voidRemove the total time spent in editing the document.voidRemoves the page count.voidRemoves the revision number.voidRemoves the security code.voidRemoves the subject.voidRemoves the template.voidRemoves the thumbnail.voidRemoves the title.voidRemoves the word count.voidsetApplicationName(String applicationName) Sets the application name.voidSets the author.voidsetCharCount(int charCount) Sets the character count.voidsetComments(String comments) Sets the comments.voidsetCreateDateTime(Date createDateTime) Sets the creation time.voidsetEditTime(long time) Sets the total time spent in editing the document.voidsetKeywords(String keywords) Sets the keywords.voidsetLastAuthor(String lastAuthor) Sets the last author.voidsetLastPrinted(Date lastPrinted) Sets the lastPrinted.voidsetLastSaveDateTime(Date time) Sets the total time spent in editing the document.voidsetPageCount(int pageCount) Sets the page count.voidsetRevNumber(String revNumber) Sets the revision number.voidsetSecurity(int security) Sets the security code.voidsetSubject(String subject) Sets the subject.voidsetTemplate(String template) Sets the template.voidsetThumbnail(byte[] thumbnail) Sets the thumbnail.voidSets the title.voidsetWordCount(int wordCount) Sets the word count.Methods inherited from class loci.poi.hpsf.SpecialPropertySet
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, writeMethods inherited from class loci.poi.hpsf.PropertySet
getSingleSection, isPropertySetStream, isPropertySetStream
-
Field Details
-
DEFAULT_STREAM_NAME
The document name a summary information stream usually has in a POIFS filesystem.
- See Also:
-
-
Constructor Details
-
SummaryInformation
Creates a
SummaryInformationfrom a givenPropertySet.- Parameters:
ps- A property set which should be created from a summary information stream.- Throws:
UnexpectedPropertySetTypeException- if ps does not contain a summary information stream.
-
-
Method Details
-
getTitle
Returns the title (or
null).- Returns:
- The title or
null
-
setTitle
Sets the title.
- Parameters:
title- The title to set.
-
removeTitle
public void removeTitle()Removes the title.
-
getSubject
Returns the subject (or
null).- Returns:
- The subject or
null
-
setSubject
Sets the subject.
- Parameters:
subject- The subject to set.
-
removeSubject
public void removeSubject()Removes the subject.
-
getAuthor
Returns the author (or
null).- Returns:
- The author or
null
-
setAuthor
Sets the author.
- Parameters:
author- The author to set.
-
removeAuthor
public void removeAuthor()Removes the author.
-
getKeywords
Returns the keywords (or
null).- Returns:
- The keywords or
null
-
setKeywords
Sets the keywords.
- Parameters:
keywords- The keywords to set.
-
removeKeywords
public void removeKeywords()Removes the keywords.
-
getComments
Returns the comments (or
null).- Returns:
- The comments or
null
-
setComments
Sets the comments.
- Parameters:
comments- The comments to set.
-
removeComments
public void removeComments()Removes the comments.
-
getTemplate
Returns the template (or
null).- Returns:
- The template or
null
-
setTemplate
Sets the template.
- Parameters:
template- The template to set.
-
removeTemplate
public void removeTemplate()Removes the template.
-
getLastAuthor
Returns the last author (or
null).- Returns:
- The last author or
null
-
setLastAuthor
Sets the last author.
- Parameters:
lastAuthor- The last author to set.
-
removeLastAuthor
public void removeLastAuthor()Removes the last author.
-
getRevNumber
Returns the revision number (or
null).- Returns:
- The revision number or
null
-
setRevNumber
Sets the revision number.
- Parameters:
revNumber- The revision number to set.
-
removeRevNumber
public void removeRevNumber()Removes the revision number.
-
getEditTime
public long getEditTime()Returns the total time spent in editing the document (or
0).- Returns:
- The total time spent in editing the document or 0 if the
SummaryInformationdoes not contain this information.
-
setEditTime
public void setEditTime(long time) Sets the total time spent in editing the document.
- Parameters:
time- The time to set.
-
removeEditTime
public void removeEditTime()Remove the total time spent in editing the document.
-
getLastPrinted
Returns the last printed time (or
null).- Returns:
- The last printed time or
null
-
setLastPrinted
Sets the lastPrinted.
- Parameters:
lastPrinted- The lastPrinted to set.
-
removeLastPrinted
public void removeLastPrinted()Removes the lastPrinted.
-
getCreateDateTime
Returns the creation time (or
null).- Returns:
- The creation time or
null
-
setCreateDateTime
Sets the creation time.
- Parameters:
createDateTime- The creation time to set.
-
removeCreateDateTime
public void removeCreateDateTime()Removes the creation time.
-
getLastSaveDateTime
Returns the last save time (or
null).- Returns:
- The last save time or
null
-
setLastSaveDateTime
Sets the total time spent in editing the document.
- Parameters:
time- The time to set.
-
removeLastSaveDateTime
public void removeLastSaveDateTime()Remove the total time spent in editing the document.
-
getPageCount
public int getPageCount()Returns the page count or 0 if the
SummaryInformationdoes not contain a page count.- Returns:
- The page count or 0 if the
SummaryInformationdoes not contain a page count.
-
setPageCount
public void setPageCount(int pageCount) Sets the page count.
- Parameters:
pageCount- The page count to set.
-
removePageCount
public void removePageCount()Removes the page count.
-
getWordCount
public int getWordCount()Returns the word count or 0 if the
SummaryInformationdoes not contain a word count.- Returns:
- The word count or
null
-
setWordCount
public void setWordCount(int wordCount) Sets the word count.
- Parameters:
wordCount- The word count to set.
-
removeWordCount
public void removeWordCount()Removes the word count.
-
getCharCount
public int getCharCount()Returns the character count or 0 if the
SummaryInformationdoes not contain a char count.- Returns:
- The character count or
null
-
setCharCount
public void setCharCount(int charCount) Sets the character count.
- Parameters:
charCount- The character count to set.
-
removeCharCount
public void removeCharCount()Removes the character count.
-
getThumbnail
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.
- Returns:
- The thumbnail or
null
-
setThumbnail
public void setThumbnail(byte[] thumbnail) Sets the thumbnail.
- Parameters:
thumbnail- The thumbnail to set.
-
removeThumbnail
public void removeThumbnail()Removes the thumbnail.
-
getApplicationName
Returns the application name (or
null).- Returns:
- The application name or
null
-
setApplicationName
Sets the application name.
- Parameters:
applicationName- The application name to set.
-
removeApplicationName
public void removeApplicationName()Removes the application name.
-
getSecurity
public int getSecurity()Returns a security code which is one of the following values:
0 if the
SummaryInformationdoes not contain a security field or if there is no security on the document. UsePropertySet.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
- Returns:
- The security code or
null
-
setSecurity
public void setSecurity(int security) Sets the security code.
- Parameters:
security- The security code to set.
-
removeSecurity
public void removeSecurity()Removes the security code.
-