From acb0f2bc5f35e6337e630a5ea71e4271c7effa8b Mon Sep 17 00:00:00 2001
From: "Andrew C. Oliver"
Date: Fri, 22 Feb 2002 04:28:55 +0000
Subject: [PATCH] PR: Obtained from: Submitted by: Reviewed by: added stuff
from the klute-meister
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352112 13f79535-47bb-0310-9956-ffa450edef68
---
.../poi/contrib/poibrowser/POIBrowser.java | 14 ++++++-
.../poibrowser/TreeReaderListener.java | 2 +-
src/documentation/xdocs/book.xml | 1 +
src/documentation/xdocs/hpsf/book.xml | 16 ++++++++
src/documentation/xdocs/hpsf/how-to.xml | 17 ++++++++
src/documentation/xdocs/hpsf/index.xml | 16 ++++++++
src/documentation/xdocs/hpsf/internals.xml | 17 ++++++++
src/documentation/xdocs/index.xml | 39 ++++++++++++-------
src/documentation/xdocs/overview.xml | 7 ++++
src/documentation/xdocs/who.xml | 1 +
10 files changed, 112 insertions(+), 18 deletions(-)
create mode 100644 src/documentation/xdocs/hpsf/book.xml
create mode 100644 src/documentation/xdocs/hpsf/how-to.xml
create mode 100644 src/documentation/xdocs/hpsf/index.xml
create mode 100644 src/documentation/xdocs/hpsf/internals.xml
diff --git a/src/contrib/src/org/apache/poi/contrib/poibrowser/POIBrowser.java b/src/contrib/src/org/apache/poi/contrib/poibrowser/POIBrowser.java
index 1eb18783cc..90ccf3c694 100644
--- a/src/contrib/src/org/apache/poi/contrib/poibrowser/POIBrowser.java
+++ b/src/contrib/src/org/apache/poi/contrib/poibrowser/POIBrowser.java
@@ -110,7 +110,7 @@ public class POIBrowser extends JFrame
/* Create the tree model with a root node. The latter is
* invisible but it must be present because a tree model
* always needs a root. */
- rootNode = new DefaultMutableTreeNode("POIFS");
+ rootNode = new DefaultMutableTreeNode("POI Filesystems");
DefaultTreeModel treeModel = new DefaultTreeModel(rootNode);
/* Create the tree UI element. */
@@ -118,6 +118,7 @@ public class POIBrowser extends JFrame
getContentPane().add(new JScrollPane(treeUI));
/* Add the POI filesystems to the tree. */
+ int displayedFiles = 0;
for (int i = 0; i < args.length; i++)
{
final String filename = args[i];
@@ -126,6 +127,7 @@ public class POIBrowser extends JFrame
POIFSReader r = new POIFSReader();
r.registerListener(new TreeReaderListener(filename, rootNode));
r.read(new FileInputStream(filename));
+ displayedFiles++;
}
catch (IOException ex)
{
@@ -139,6 +141,14 @@ public class POIBrowser extends JFrame
}
}
+ /* Exit if there is no file to display (none specified or only
+ * files with problems). */
+ if (displayedFiles == 0)
+ {
+ System.out.println("No POI filesystem(s) to display.");
+ System.exit(0);
+ }
+
/* Make the tree UI element visible. */
treeUI.setRootVisible(true);
treeUI.setShowsRootHandles(true);
@@ -149,7 +159,7 @@ public class POIBrowser extends JFrame
new PropertySetDescriptorRenderer());
treeUI.setCellRenderer(etcr);
setSize(600, 450);
- setTitle("POI Browser 0.10");
+ setTitle("POI Browser 0.06");
setVisible(true);
}
diff --git a/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java b/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java
index 124c595b60..bcb237ea9b 100644
--- a/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java
+++ b/src/contrib/src/org/apache/poi/contrib/poibrowser/TreeReaderListener.java
@@ -134,7 +134,7 @@ public class TreeReaderListener implements POIFSReaderListener
{
this.filename = filename;
this.rootNode = rootNode;
- pathToNode = new HashMap(15);
+ pathToNode = new HashMap(15); // Should be a reasonable guess.
}
diff --git a/src/documentation/xdocs/book.xml b/src/documentation/xdocs/book.xml
index 02756a5527..cff2077fcc 100644
--- a/src/documentation/xdocs/book.xml
+++ b/src/documentation/xdocs/book.xml
@@ -27,6 +27,7 @@
+
diff --git a/src/documentation/xdocs/hpsf/book.xml b/src/documentation/xdocs/hpsf/book.xml
new file mode 100644
index 0000000000..2af07554bb
--- /dev/null
+++ b/src/documentation/xdocs/hpsf/book.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/documentation/xdocs/hpsf/how-to.xml b/src/documentation/xdocs/hpsf/how-to.xml
new file mode 100644
index 0000000000..4436b14bd7
--- /dev/null
+++ b/src/documentation/xdocs/hpsf/how-to.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ HPSF HOW-TO
+
+
+
+
+
+
+
TODO: This documentation is still to be written. For the
+ time being, please see the API documentation (javadocs) of the
+ org.apache.poi.hpsf package.
TODO: This documentation is still to be written. For the
+ time being, please see http://www.rainer-klute.de/~klute/Software/poibrowser/doc/HPSF-Description.html.
+
+
+
diff --git a/src/documentation/xdocs/index.xml b/src/documentation/xdocs/index.xml
index e7430573d0..0f0f685533 100644
--- a/src/documentation/xdocs/index.xml
+++ b/src/documentation/xdocs/index.xml
@@ -27,7 +27,7 @@
XLS format; and Lucene for which we'll soon have file
format interpretors. When practical, we donate components directly to those projects for POI-enabling them.
-
+
We'll tackle this on a component level. POI refers to the whole project.
@@ -70,32 +70,41 @@
- A common misconception is that POI writes Excel files. POI is the name of the project. POI contains several
+
A common misconception is that POI writes Excel files. POI is the name of the project. POI contains several
components, one of which, HSSF, writes Excel files. The following are components of the entire POI project
- and a brief summary of their purpose.
+ and a brief summary of their purpose.
-
- POIFS is the oldest and most stable part of the project. It is our port of the OLE 2 Compound Document Format to
+
+
POIFS is the oldest and most stable part of the project. It is our port of the OLE 2 Compound Document Format to
pure Java. It supports both read and write functionality. All of our components ultimately rely on it by
- definition. Please see the POIFS project page for more information.
+ definition. Please see the POIFS project page for more information.
-
- HSSF is our port of the Microsoft Excel 97(-2002) file format (BIFF8) to pure Java. It supports read and write
- capability. Please see the HSSF project page for more information.
+
+
HSSF is our port of the Microsoft Excel 97(-2002) file format (BIFF8) to pure Java. It supports read and write
+ capability. Please see the HSSF project page for more information.
-
- HDF is our port of the Microsoft Word 97 file format to pure Java. It supports read and write capability.
+
+
HDF is our port of the Microsoft Word 97 file format to pure Java. It supports read and write capability.
Please see the HDF project page for more information. This component is
- in the early stages of design. Jump in!
+ in the early stages of design. Jump in!
+
+
+
HPSF is our port of the OLE 2 property set format to pure
+ Java. Property sets are mostly use to store a document's properties
+ (title, author, date of last modification etc.), but they can be used
+ for application-specific purposes as well. Currently HPSF supports
+ read functionality only. Please see the HPSF project page for more
+ information.
- The HSSF Serializer, which was part of our 1.0 release and last builds on
+
The HSSF Serializer, which was part of our 1.0 release and last builds on
Sourceforge, has been donated to the Cocoon project. We're
- currently in the process of porting it over.
-