org.apache.poi.hpsf
Class SpecialPropertySet

java.lang.Object
  |
  +--org.apache.poi.hpsf.PropertySet
        |
        +--org.apache.poi.hpsf.SpecialPropertySet
Direct Known Subclasses:
DocumentSummaryInformation, SummaryInformation

public abstract class SpecialPropertySet
extends PropertySet

Abstract superclass for the convenience classes SummaryInformation and DocumentSummaryInformation.

The motivation behind this class is quite nasty if you look behind the scenes, but it serves the application programmer well by providing him with the easy-to-use SummaryInformation and DocumentSummaryInformation classes. When parsing the data a property set stream consists of (possibly coming from an InputStream) we want to read and process each byte only once. Since we don't know in advance which kind of property set we have, we can expect only the most general PropertySet. Creating a special subclass should be as easy as calling the special subclass' constructor and pass the general PropertySet in. To make things easy internally, the special class just holds a reference to the general PropertySet and delegates all method calls to it.

A cleaner implementation would have been like this: The PropertySetFactory parses the stream data into some internal object first. Then it finds out whether the stream is a SummaryInformation, a DocumentSummaryInformation or a general PropertySet. However, the current implementation went the other way round historically: the convenience classes came only late to my mind.

Since:
2002-02-09
Version:
$Id: SpecialPropertySet.java,v 1.5 2002/05/19 18:09:26 acoliver Exp $
Author:
Rainer Klute (klute@rainer-klute.de)

Constructor Summary
SpecialPropertySet(PropertySet ps)
          Constructor for the SpecialPropertySet object
 
Method Summary
 int getByteOrder()
          Gets the byteOrder attribute of the SpecialPropertySet object
 ClassID getClassID()
          Gets the classID attribute of the SpecialPropertySet object
 int getFormat()
          Gets the format attribute of the SpecialPropertySet object
 long getOSVersion()
          Gets the oSVersion attribute of the SpecialPropertySet object
 long getSectionCount()
          Gets the sectionCount attribute of the SpecialPropertySet object
 java.util.List getSections()
          Gets the sections attribute of the SpecialPropertySet object
 Section getSingleSection()
          Gets the singleSection attribute of the SpecialPropertySet object
 boolean isDocumentSummaryInformation()
          Gets the documentSummaryInformation attribute of the SpecialPropertySet object
 boolean isSummaryInformation()
          Gets the summaryInformation attribute of the SpecialPropertySet object
 
Methods inherited from class org.apache.poi.hpsf.PropertySet
getProperties, getProperty, getPropertyBooleanValue, getPropertyIntValue, isPropertySetStream, isPropertySetStream, wasNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecialPropertySet

public SpecialPropertySet(PropertySet ps)
Constructor for the SpecialPropertySet object

Parameters:
ps - Description of the Parameter
Method Detail

getByteOrder

public int getByteOrder()
Gets the byteOrder attribute of the SpecialPropertySet object

Overrides:
getByteOrder in class PropertySet
Returns:
The byteOrder value

getFormat

public int getFormat()
Gets the format attribute of the SpecialPropertySet object

Overrides:
getFormat in class PropertySet
Returns:
The format value

getOSVersion

public long getOSVersion()
Gets the oSVersion attribute of the SpecialPropertySet object

Overrides:
getOSVersion in class PropertySet
Returns:
The oSVersion value

getClassID

public ClassID getClassID()
Gets the classID attribute of the SpecialPropertySet object

Overrides:
getClassID in class PropertySet
Returns:
The classID value

getSectionCount

public long getSectionCount()
Gets the sectionCount attribute of the SpecialPropertySet object

Overrides:
getSectionCount in class PropertySet
Returns:
The sectionCount value

getSections

public java.util.List getSections()
Gets the sections attribute of the SpecialPropertySet object

Overrides:
getSections in class PropertySet
Returns:
The sections value

isSummaryInformation

public boolean isSummaryInformation()
Gets the summaryInformation attribute of the SpecialPropertySet object

Overrides:
isSummaryInformation in class PropertySet
Returns:
The summaryInformation value

isDocumentSummaryInformation

public boolean isDocumentSummaryInformation()
Gets the documentSummaryInformation attribute of the SpecialPropertySet object

Overrides:
isDocumentSummaryInformation in class PropertySet
Returns:
The documentSummaryInformation value

getSingleSection

public Section getSingleSection()
Gets the singleSection attribute of the SpecialPropertySet object

Overrides:
getSingleSection in class PropertySet
Returns:
The singleSection value

jakarta-poi 1.8.0-dev

Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.