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 1eb18783c..90ccf3c69 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 124c595b6..bcb237ea9 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 02756a552..cff2077fc 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 000000000..2af07554b --- /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 000000000..4436b14bd --- /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.

+
+ +
diff --git a/src/documentation/xdocs/hpsf/index.xml b/src/documentation/xdocs/hpsf/index.xml new file mode 100644 index 000000000..91d6166b9 --- /dev/null +++ b/src/documentation/xdocs/hpsf/index.xml @@ -0,0 +1,16 @@ + + + +
+ HPSF (Horrible Property Set Format) + Overview + + + +
+ + +

TODO: This documentation is still to be written.

+
+ +
diff --git a/src/documentation/xdocs/hpsf/internals.xml b/src/documentation/xdocs/hpsf/internals.xml new file mode 100644 index 000000000..37602d079 --- /dev/null +++ b/src/documentation/xdocs/hpsf/internals.xml @@ -0,0 +1,17 @@ + + + +
+ HPSF Internals + + + +
+ + +

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 e7430573d..0f0f68553 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. - + currently in the process of porting it over.

+

diff --git a/src/documentation/xdocs/overview.xml b/src/documentation/xdocs/overview.xml index 42ec4aedb..951985e6e 100644 --- a/src/documentation/xdocs/overview.xml +++ b/src/documentation/xdocs/overview.xml @@ -43,6 +43,13 @@

+ +

+ HPSF is the set of APIs + for reading property sets using (only) Java. +

+
+

POI-Utils are general purpose artifacts diff --git a/src/documentation/xdocs/who.xml b/src/documentation/xdocs/who.xml index 250bbb77b..8b4b87c17 100644 --- a/src/documentation/xdocs/who.xml +++ b/src/documentation/xdocs/who.xml @@ -48,6 +48,7 @@

  • Glen Stampoultzis (glens at apache.org)
  • Nicola Ken Barozzi (barozzi at nicolaken dot com)
  • +
  • Rainer Klute (klute at rainer-klute dot de)