Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi
Class POIDocument

    java.lang.Object
      org.apache.poi.POIDocument

Direct Known Subclasses:
  HDGFDiagram, HPBFDocument, HSLFSlideShow, HSSFWorkbook, HWPFDocumentCore, MAPIMessage

    public abstract class POIDocument

extends java.lang.Object

This holds the common functionality for all POI Document classes. Currently, this relates to Document Information Properties

Author:
  Nick Burch

Field Summary
`protected DirectoryNode` | `directory` The directory that our document lives in
`protected POIFSFileSystem` | `filesystem` The open POIFS FileSystem that contains our document

Constructor Summary
`protected` | `POIDocument(DirectoryNode dir, POIFSFileSystem fs)`
`protected` | `POIDocument(POIFSFileSystem fs)`

Method Summary
`protected void` | `copyNodes(POIFSFileSystem source, POIFSFileSystem target, java.util.List excepts)` Copies nodes from one POIFS to the other minus the excepts
`void` | `createInformationProperties()` Will create whichever of SummaryInformation and DocumentSummaryInformation (HPSF) properties are not already part of your document.
`DocumentSummaryInformation` | `getDocumentSummaryInformation()` Fetch the Document Summary Information of the document
`protected PropertySet` | `getPropertySet(java.lang.String setName)` For a given named property entry, either return it or null if if it wasn't found
`SummaryInformation` | `getSummaryInformation()` Fetch the Summary Information of the document
`protected void` | `readProperties()` Find, and create objects for, the standard Documment Information Properties (HPSF).
`abstract void` | `write(java.io.OutputStream out)` Writes the document out to the specified output stream
`protected void` | `writeProperties(POIFSFileSystem outFS)` Writes out the standard Documment Information Properties (HPSF)
`protected void` | `writeProperties(POIFSFileSystem outFS, java.util.List writtenEntries)` Writes out the standard Documment Information Properties (HPSF)
`protected void` | `writePropertySet(java.lang.String name, PropertySet set, POIFSFileSystem outFS)` Writes out a given ProperySet

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### filesystem

    protected POIFSFileSystem filesystem

  The open POIFS FileSystem that contains our document

### directory

    protected DirectoryNode directory

  The directory that our document lives in

Constructor Detail

### POIDocument

    protected POIDocument(DirectoryNode dir,
                          POIFSFileSystem fs)

### POIDocument

    protected POIDocument(POIFSFileSystem fs)

Method Detail

### getDocumentSummaryInformation

    public DocumentSummaryInformation getDocumentSummaryInformation()

  Fetch the Document Summary Information of the document

### getSummaryInformation

    public SummaryInformation getSummaryInformation()

  Fetch the Summary Information of the document

### createInformationProperties

    public void createInformationProperties()

  Will create whichever of SummaryInformation and DocumentSummaryInformation (HPSF) properties are not already part of your document. This is normally useful when creating a new document from scratch. If the information properties are already there, then nothing will happen.

### readProperties

    protected void readProperties()

  Find, and create objects for, the standard Documment Information Properties (HPSF). If a given property set is missing or corrupt, it will remain null;

### getPropertySet

    protected PropertySet getPropertySet(java.lang.String setName)

  For a given named property entry, either return it or null if if it wasn't found

### writeProperties

    protected void writeProperties(POIFSFileSystem outFS)
                            throws java.io.IOException

  Writes out the standard Documment Information Properties (HPSF)

  Parameters:
    `outFS` - the POIFSFileSystem to write the properties into
  Throws:
    `java.io.IOException`

### writeProperties

    protected void writeProperties(POIFSFileSystem outFS,
                                   java.util.List writtenEntries)
                            throws java.io.IOException

  Writes out the standard Documment Information Properties (HPSF)

  Parameters:
    `outFS` - the POIFSFileSystem to write the properties into
    `writtenEntries` - a list of POIFS entries to add the property names too
  Throws:
    `java.io.IOException`

### writePropertySet

    protected void writePropertySet(java.lang.String name,
                                    PropertySet set,
                                    POIFSFileSystem outFS)
                             throws java.io.IOException

  Writes out a given ProperySet

  Parameters:
    `name` - the (POIFS Level) name of the property to write
    `set` - the PropertySet to write out
    `outFS` - the POIFSFileSystem to write the property into
  Throws:
    `java.io.IOException`

### write

    public abstract void write(java.io.OutputStream out)
                        throws java.io.IOException

  Writes the document out to the specified output stream

  Throws:
    `java.io.IOException`

### copyNodes

    protected void copyNodes(POIFSFileSystem source,
                             POIFSFileSystem target,
                             java.util.List excepts)
                      throws java.io.IOException

  Copies nodes from one POIFS to the other minus the excepts

  Parameters:
    `source` - is the source POIFS to copy from
    `target` - is the target POIFS to copy to
    `excepts` - is a list of Strings specifying what nodes NOT to copy
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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