org.apache.poi.hpsf
Class SummaryInformation

java.lang.Object
  extended by org.apache.poi.hpsf.PropertySet
      extended by org.apache.poi.hpsf.MutablePropertySet
          extended by org.apache.poi.hpsf.SpecialPropertySet
              extended by org.apache.poi.hpsf.SummaryInformation

public final class SummaryInformation
extends SpecialPropertySet

Convenience class representing a Summary Information stream in a Microsoft Office document.

Author:
Rainer Klute <klute@rainer-klute.de>
See Also:
DocumentSummaryInformation

Field Summary
static java.lang.String DEFAULT_STREAM_NAME
          The document name a summary information stream usually has in a POIFS filesystem.
 
Fields inherited from class org.apache.poi.hpsf.PropertySet
byteOrder, classID, format, OS_MACINTOSH, OS_WIN16, OS_WIN32, osVersion, sections
 
Constructor Summary
SummaryInformation(PropertySet ps)
          Creates a SummaryInformation from a given PropertySet.
 
Method Summary
 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.
 PropertyIDMap getPropertySetIDMap()
          The id to name mapping of the properties in this set.
 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.
 
Methods inherited from class org.apache.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, write
 
Methods inherited from class org.apache.poi.hpsf.PropertySet
getSingleSection, isPropertySetStream, isPropertySetStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_STREAM_NAME

public static final java.lang.String DEFAULT_STREAM_NAME

The document name a summary information stream usually has in a POIFS filesystem.

See Also:
Constant Field Values
Constructor Detail

SummaryInformation

public SummaryInformation(PropertySet ps)
                   throws UnexpectedPropertySetTypeException

Creates a SummaryInformation from a given PropertySet.

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 Detail

getPropertySetIDMap

public PropertyIDMap getPropertySetIDMap()
Description copied from class: SpecialPropertySet
The id to name mapping of the properties in this set.

Specified by:
getPropertySetIDMap in class SpecialPropertySet

getTitle

public java.lang.String getTitle()

Returns the title (or null).

Returns:
The title or null

setTitle

public void setTitle(java.lang.String title)

Sets the title.

Parameters:
title - The title to set.

removeTitle

public void removeTitle()

Removes the title.


getSubject

public java.lang.String getSubject()

Returns the subject (or null).

Returns:
The subject or null

setSubject

public void setSubject(java.lang.String subject)

Sets the subject.

Parameters:
subject - The subject to set.

removeSubject

public void removeSubject()

Removes the subject.


getAuthor

public java.lang.String getAuthor()

Returns the author (or null).

Returns:
The author or null

setAuthor

public void setAuthor(java.lang.String author)

Sets the author.

Parameters:
author - The author to set.

removeAuthor

public void removeAuthor()

Removes the author.


getKeywords

public java.lang.String getKeywords()

Returns the keywords (or null).

Returns:
The keywords or null

setKeywords

public void setKeywords(java.lang.String keywords)

Sets the keywords.

Parameters:
keywords - The keywords to set.

removeKeywords

public void removeKeywords()

Removes the keywords.


getComments

public java.lang.String getComments()

Returns the comments (or null).

Returns:
The comments or null

setComments

public void setComments(java.lang.String comments)

Sets the comments.

Parameters:
comments - The comments to set.

removeComments

public void removeComments()

Removes the comments.


getTemplate

public java.lang.String getTemplate()

Returns the template (or null).

Returns:
The template or null

setTemplate

public void setTemplate(java.lang.String template)

Sets the template.

Parameters:
template - The template to set.

removeTemplate

public void removeTemplate()

Removes the template.


getLastAuthor

public java.lang.String getLastAuthor()

Returns the last author (or null).

Returns:
The last author or null

setLastAuthor

public void setLastAuthor(java.lang.String lastAuthor)

Sets the last author.

Parameters:
lastAuthor - The last author to set.

removeLastAuthor

public void removeLastAuthor()

Removes the last author.


getRevNumber

public java.lang.String getRevNumber()

Returns the revision number (or null).

Returns:
The revision number or null

setRevNumber

public void setRevNumber(java.lang.String revNumber)

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 SummaryInformation does 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

public java.util.Date getLastPrinted()

Returns the last printed time (or null).

Returns:
The last printed time or null

setLastPrinted

public void setLastPrinted(java.util.Date lastPrinted)

Sets the lastPrinted.

Parameters:
lastPrinted - The lastPrinted to set.

removeLastPrinted

public void removeLastPrinted()

Removes the lastPrinted.


getCreateDateTime

public java.util.Date getCreateDateTime()

Returns the creation time (or null).

Returns:
The creation time or null

setCreateDateTime

public void setCreateDateTime(java.util.Date createDateTime)

Sets the creation time.

Parameters:
createDateTime - The creation time to set.

removeCreateDateTime

public void removeCreateDateTime()

Removes the creation time.


getLastSaveDateTime

public java.util.Date getLastSaveDateTime()

Returns the last save time (or null).

Returns:
The last save time or null

setLastSaveDateTime

public void setLastSaveDateTime(java.util.Date time)

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 SummaryInformation does not contain a page count.

Returns:
The page count or 0 if the SummaryInformation does 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 SummaryInformation does 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 SummaryInformation does 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

public java.lang.String getApplicationName()

Returns the application name (or null).

Returns:
The application name or null

setApplicationName

public void setApplicationName(java.lang.String applicationName)

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:

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.



Copyright 2012 The Apache Software Foundation or its licensors, as applicable.