Organizes document information in a tree model in order to be
e.g. displayed in a Swing
javax.swing.JTree . An instance of this
class is created with a root tree node (
MutableTreeNode ) and
registered as a
POIFSReaderListener with a
org.apache.poi.poifs.eventfilesystem.POIFSReader . While the latter processes
a POI filesystem it calls this class'
TreeReaderListener.processPOIFSReaderEvent for
each document it has been registered for. This method appends the document it
processes at the appropriate position into the tree rooted at the
above mentioned root tree node.
The root tree node should be the root tree node of a
javax.swing.tree.TreeModel .
A top-level element in the tree model, i.e. an immediate child
node of the root node, describes a POI filesystem as such. It is
suggested to use the file's name (as seen by the operating system)
but it could be any other string.
The value of a tree node is a
DocumentDescriptor . Unlike
a
org.apache.poi.poifs.filesystem.POIFSDocument which may be as heavy
as many megabytes, an instance of
DocumentDescriptor is a
light-weight object and contains only some meta-information about a
document.
author: Rainer Klute author: href="mailto:klute@rainer-klute.de"><klute@rainer-klute.de> version: $Id: TreeReaderListener.java 489730 2006-12-22 19:18:16Z bayard $ since: 2002-01-24 |