From 68c9b04b37d9bdefbae2701471f6ad85ff694783 Mon Sep 17 00:00:00 2001 From: Rainer Klute Date: Tue, 25 Jan 2005 20:08:18 +0000 Subject: [PATCH] - Compiling POI now includes the example classes. - Javadoc now includes the example classes. - Added usage instructions to the POI Browser documentation. - Added references to the examples and the contributed software to the POI overview. - Added a missing import to an HPSF example class. git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353626 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 127 ++++++++++++------ .../poi/contrib/poibrowser/package.html | 47 +++++++ src/documentation/content/xdocs/overview.xml | 35 ++++- .../hpsf/examples/WriteAuthorAndTitle.java | 1 + 4 files changed, 165 insertions(+), 45 deletions(-) diff --git a/build.xml b/build.xml index 763d83d63..cc07a699b 100644 --- a/build.xml +++ b/build.xml @@ -41,44 +41,65 @@ The POI project Ant build. - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -117,6 +138,11 @@ + + + + + @@ -170,8 +196,9 @@ - + + @@ -221,8 +248,9 @@ - + @@ -266,6 +294,12 @@ + + + + + + @@ -550,7 +584,7 @@ FORREST_HOME environment variable! version="true" use="true" verbose="false" - windowtitle="POI API"> + windowtitle="POI API Documentation"> @@ -561,17 +595,21 @@ FORREST_HOME environment variable! + + + + - POI Documentation]]> + POI API Documentation]]> Copyright ${tstamp.year} The Apache Software Foundation or - its licensors, as applicable.]]> + its licensors, as applicable.]]> @@ -580,6 +618,11 @@ FORREST_HOME environment variable! + + Examples + + + diff --git a/src/contrib/src/org/apache/poi/contrib/poibrowser/package.html b/src/contrib/src/org/apache/poi/contrib/poibrowser/package.html index 979e867ed..ef4fbaa29 100644 --- a/src/contrib/src/org/apache/poi/contrib/poibrowser/package.html +++ b/src/contrib/src/org/apache/poi/contrib/poibrowser/package.html @@ -32,6 +32,10 @@ (operating system) filenames. An internal file (i.e. a "stream" or a "document") is shown with its name, its size and a hexadecimal dump of its first bytes.

+ + +
+

Property Set Streams

The POI Browser pays special attention to property set streams. For example, the \005SummaryInformation stream contains information @@ -40,6 +44,49 @@ not just its first bytes but analyses the whole stream and displays its contents in a more or less readable manner.

+ +
+

Running POI Browser

+ +

Running the POI Browser requires you to start a Java Virtual Machine + (JVM) and to set up a valid classpath so that the JVM can find all the Java + classes it needs. These are the main POI classes and the "contrib" POI + classes.

+ +

The following instructions assume that you have set up your Java + enviromnent variables properly, i.e. the variable JAVA_HOME contains the + name of your Java installation directory and the variable PATH includes the + bin subdirectory of the Java installation directory. At the time + of this writing the current POI version was 2.5.1-final dating from August + 4th, 2004. The example statements reflect version numbering and + date. Change the commands accordingly if you are running the POI Browser of + a later or earlier than this!

+ +
+

Running POI Browser on Unix

+ +

Suppose you have unpacked the POI 2.5.1 release in the + /opt/local/poi directory of your Unix box. Then the following + command starts the POI Browser and displays the structure of the files + MyWord.doc, MyExcel.xls and + MyPowerpoint.ppt:

+ +
java -classpath /opt/local/poi/poi-2.5.1-final-20040804.jar:/opt/local/poi/poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt
+
+ +
+

Running POI Browser on Windows

+ +

Suppose you have unpacked the POI 2.5.1 release in the + C:\Programs\POI directory of your Windows box. Then the following + command starts the POI Browser and displays the structure of the files + MyWord.doc, MyExcel.xls and + MyPowerpoint.ppt:

+ +
java -classpath C:\Programs\POI\poi-2.5.1-final-20040804.jar;C:\Programs\POI\poi-contrib-2.5.1-final-20040804.jar org.apache.poi.contrib.poibrowser.POIBrowser MyWord.doc MyExcel.xls MyPowerpoint.ppt
+
+ +
diff --git a/src/documentation/content/xdocs/overview.xml b/src/documentation/content/xdocs/overview.xml index 7f69bda29..987c1868f 100644 --- a/src/documentation/content/xdocs/overview.xml +++ b/src/documentation/content/xdocs/overview.xml @@ -7,6 +7,7 @@ Overview + @@ -33,7 +34,7 @@
HSSF

HSSF is the set of APIs - for reading and writing Microsoft Excel 97(-XP) spreadsheet using (only) Java. + for reading and writing Microsoft Excel 97(-XP) spreadsheet using (only) Java.

@@ -54,17 +55,45 @@
POI-Utils

POI-Utils are general purpose artifacts - from POI development that have not yet been implemented elsewhere. We're + from POI development that have not yet been implemented elsewhere. We're always looking to donate these and maintain them as part of a general library used in another project. These are things we need to complete our mission but are generally outside of it.

+ +
+ Examples + +

Small sample programs using the POI API are available in the + src/examples directory of the source distribution. Before + studying the source code you might want to have a look at the + "Examples" section of the POI API + documentation.

+
+ +
Contributed Software +

Besides the "official" components outlined above there is some further + software distributed with POI. This is called "contributed" software. It + is not explicitly recommended or even maintained by the POI team, but + it might still be useful to you.

+ +
+ POI Browser +

The POI Browser is a very simple Swing GUI tool that displays the + internal structure of a Microsoft Office file and especially the + property set streams. Further information and instructions how to + execute it can be found in the POI + Browser package description.

+
+
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java b/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java index e5e413b46..f9fe5e934 100644 --- a/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java +++ b/src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java @@ -34,6 +34,7 @@ import org.apache.poi.hpsf.MutableSection; import org.apache.poi.hpsf.NoPropertySetStreamException; import org.apache.poi.hpsf.PropertySet; import org.apache.poi.hpsf.PropertySetFactory; +import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hpsf.Util; import org.apache.poi.hpsf.Variant; import org.apache.poi.hpsf.WritingNotSupportedException;