Package loci.poi.hpsf

Class SpecialPropertySet

  • Direct Known Subclasses:
    DocumentSummaryInformation, SummaryInformation

    public abstract class SpecialPropertySet
    extends MutablePropertySet

    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 489730 2006-12-22 19:18:16Z bayard $
    Author:
    Rainer Klute <klute@rainer-klute.de>