FileDocCategorySizeDatePackage
DocumentNode.javaAPI DocApache Poi 3.0.14477Mon Jan 01 12:39:34 GMT 2007org.apache.poi.poifs.filesystem

DocumentNode

public class DocumentNode extends EntryNode implements POIFSViewable, DocumentEntry
Simple implementation of DocumentEntry
author
Marc Johnson (mjohnson at apache dot org)

Fields Summary
private POIFSDocument
_document
Constructors Summary
DocumentNode(DocumentProperty property, DirectoryNode parent)
create a DocumentNode. This method is not public by design; it is intended strictly for the internal use of this package

param
property the DocumentProperty for this DocumentEntry
param
parent the parent of this entry

        super(property, parent);
        _document = property.getDocument();
    
Methods Summary
org.apache.poi.poifs.filesystem.POIFSDocumentgetDocument()
get the POIFSDocument

return
the internal POIFSDocument

        return _document;
    
public java.lang.StringgetShortDescription()
Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents.

return
short description

        return getName();
    
public intgetSize()
get the zize of the document, in bytes

return
size in bytes

        return getProperty().getSize();
    
public java.lang.Object[]getViewableArray()
Get an array of objects, some of which may implement POIFSViewable

return
an array of Object; may not be null, but may be empty

        return new Object[ 0 ];
    
public java.util.IteratorgetViewableIterator()
Get an Iterator of objects, some of which may implement POIFSViewable

return
an Iterator; may not be null, but may have an empty back end store

        List components = new ArrayList();

        components.add(getProperty());
        components.add(_document);
        return components.iterator();
    
protected booleanisDeleteOK()
extensions use this method to verify internal rules regarding deletion of the underlying store.

return
true if it's ok to delete the underlying store, else false

        return true;
    
public booleanisDocumentEntry()
is this a DocumentEntry?

return
true if the Entry is a DocumentEntry, else false

        return true;
    
public booleanpreferArray()
Give viewers a hint as to whether to call getViewableArray or getViewableIterator

return
true if a viewer should call getViewableArray, false if a viewer should call getViewableIterator

        return false;