Index: /trunk/java-client/gnu/getopt/package.html
===================================================================
--- /trunk/java-client/gnu/getopt/package.html	(revision 2156)
+++ /trunk/java-client/gnu/getopt/package.html	(revision 2156)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+   <title>Utils Package</title>
+</head>
+<body bgcolor="#FFFFFF">
+A package for parsing line arguments to programs.
+</body>
+</html>
Index: /trunk/java-client/org/nzdl/gsdl/package.html
===================================================================
--- /trunk/java-client/org/nzdl/gsdl/package.html	(revision 2156)
+++ /trunk/java-client/org/nzdl/gsdl/package.html	(revision 2156)
@@ -0,0 +1,13 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+   <title>Utils Package</title>
+</head>
+<body bgcolor="#FFFFFF">
+Contains following classes: SearchAllCollections, SimpleClient
+(can be used to test the workings of the client-side interface) and
+SimpleServer (a basic Greenstone Server).
+</body>
+</html>
Index: /trunk/java-client/org/nzdl/gsdl/ptp/package.html
===================================================================
--- /trunk/java-client/org/nzdl/gsdl/ptp/package.html	(revision 2156)
+++ /trunk/java-client/org/nzdl/gsdl/ptp/package.html	(revision 2156)
@@ -0,0 +1,12 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+   <title>Utils Package</title>
+</head>
+<body bgcolor="#FFFFFF">
+Contains classes for representing: Connection, HTTP, IOR,
+Node Poller and PTP.
+</body>
+</html>
Index: /trunk/java-client/org/nzdl/gsdl/service/package.html
===================================================================
--- /trunk/java-client/org/nzdl/gsdl/service/package.html	(revision 2156)
+++ /trunk/java-client/org/nzdl/gsdl/service/package.html	(revision 2156)
@@ -0,0 +1,252 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+   <title>: Package org.nzdl.gsdl.service</title>
+<!--NewPage-->
+<!-- Generated by javadoc on Thu Mar 08 23:01:13 GMT+13:00 2001 -->
+</head>
+<body bgcolor="#FFFFFF">
+Provides services for java client-side communication
+to a Greenstone Digital Library via CORBA.
+<p><b>See:</b>
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><a href="#package_description">Description</a></b>
+<table BORDER CELLSPACING=0 CELLPADDING=3 WIDTH="100%" >
+<tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<td COLSPAN="2"><b><font size=+2>Interface Summary</font></b></td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><i><a href="NzdlService.html">NzdlService</a></i></b></td>
+
+<td>An object that services CORBA client requests to a Greenstone Digital
+Library.</td>
+</tr>
+</table>
+
+<table BORDER CELLSPACING=0 CELLPADDING=3 WIDTH="100%" >
+<tr BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
+<td COLSPAN="2"><b><font size=+2>Class Summary</font></b></td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlCollectionInfo.html">NzdlCollectionInfo</a></b></td>
+
+<td>An object that stores information on a collection.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlQuery.html">NzdlQuery</a></b></td>
+
+<td>NzdlQuery is an object that holds the options for a query and is easily
+configured by the user.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlQueryHit.html">NzdlQueryHit</a></b></td>
+
+<td>Holds a single result from a query.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlRequest.html">NzdlRequest</a></b></td>
+
+<td>An object that holds CORBA request data ready for by servicing by <tt><a href="NzdlService.html">NzdlService</a></tt>.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlResponse.html">NzdlResponse</a></b></td>
+
+<td>An object that holds data from a response after a <tt><a href="NzdlRequest.html">NzdlRequest</a></tt>
+has been serviced by <tt><a href="NzdlService.html">NzdlService</a></tt>.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlResultSet.html">NzdlResultSet</a></b></td>
+
+<td>An object that holds results extracted from a response by <tt><a href="NzdlResponse.html#getResultSet()">NzdlResponse.getResultSet()</a></tt>.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlServiceClient.html">NzdlServiceClient</a></b></td>
+
+<td>Used to implement the <tt><a href="NzdlService.html">NzdlService</a></tt>
+object.</td>
+</tr>
+
+<tr BGCOLOR="#FFFFFF" CLASS="TableRowColor">
+<td WIDTH="15%"><b><a href="NzdlServiceServer.html">NzdlServiceServer</a></b></td>
+
+<td>SimpleServer Based on algorithms in ...</td>
+</tr>
+</table>
+
+<p><a NAME="package_description"></a><!-- -->
+<h2>
+Package org.nzdl.gsdl.service Description</h2>
+Provides services for java client-side communication to a Greenstone Digital
+Library via CORBA.
+<br>&nbsp;
+<h2>
+Further Requirements</h2>
+
+<ul>
+<li>
+Sun Java 2 version 1.3 (or later)</li>
+
+<li>
+Corbaserver, a server-side application for communicating to a Greenstone
+Digital Library.</li>
+</ul>
+
+<h2>
+Java Interface Data Flows</h2>
+
+<center><img SRC="nzdl-service-package.png" ALT="NZDL Data Flow Diagram" height=280 width=637></center>
+
+<p><br>
+<h2>
+A Typical Query</h2>
+From a users perspective, a typical query may work&nbsp; as follows:
+<ul>
+<li>
+&nbsp;Create instances of the necessary NZDL Java-Client objects:</li>
+
+<ul>
+<li>
+&nbsp; a <b>NzdlQuery</b> object</li>
+
+<li>
+&nbsp; a <b>NzdlRequest </b>object using your <b>NzdlQuery</b> object</li>
+
+<li>
+&nbsp; a <b>NzdlResponse</b> object that will eventually hold response
+data</li>
+
+<li>
+&nbsp; a <b>NzdlService</b> object to service CORBA interface requests
+to a Greenstone collection</li>
+</ul>
+
+<li>
+Use the <b>NzdlService</b> object (with collection name and <b>NzdlRequest
+</b>object)
+to query the CORBA interface and place the reply into the <b>NzdlResponse</b>
+object.</li>
+
+<li>
+Create an instance of the <b>NzdlResultSet</b> object. Use <b>NzdlResponse.getResultSet()
+</b>to
+extract response data into the <b>NzdlResultSet</b> object.</li>
+
+<li>
+Use the <b>NzdlResultSet</b> methods to view data such as document IDs</li>
+
+<br>Get documents using <b>NzdlService.getDocument()</b></ul>
+<b></b>
+<h1>
+Sample Code</h1>
+<tt>/**</tt>
+<br><tt>* TrivialDemo.java.</tt>
+<br><tt>* A very simple application that:</tt>
+<br><tt>* - reads an Interoperable Object Reference (IOR) from a file;</tt>
+<br><tt>* - lists all available collections;</tt>
+<br><tt>* - searches "demo" collection for "snail farming";</tt>
+<br><tt>* - prints the number of hits;</tt>
+<br><tt>* - lists first 10 titles found;</tt>
+<br><tt>* - displays the unformatted text of first document found.</tt>
+<br><tt>*/</tt>
+<br><tt>import java.io.*;</tt>
+<br><tt>import java.util.*;</tt>
+<br><tt>import java.lang.*;</tt>
+<br><tt>import org.nzdl.gsdl.service.*; //the java-client stuff</tt>
+<p><tt>public class TrivialDemo {</tt>
+<br><tt>&nbsp; public static void main( String [] args )</tt>
+<br><tt>&nbsp; {</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; String myIorFile = "/tmp/localcorba.objid";</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; String myQueryString = "snail farming";</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; String myCollection = "demo";</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Use NzdlService to create corba connection</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlService myService = new NzdlServiceClient</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+( null, null, getIor(myIorFile) );</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Use getCollectionSet to obtain List of Collections</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; Set myCollections = myService.getCollectionSet();</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; //Display List of Collections</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println("\nThe available collections:");</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; for (Iterator i = myCollections.iterator(); i.hasNext();
+)</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String collName = (String)
+i.next();</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("&nbsp;
+"+ collName);</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Find The Number of documents in my collection</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlCollectionInfo myInfo = myService.getCollectionInfo(myCollection);</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println("\nNum Of Collection docs
+= "+myInfo.getNumOfDocs());</tt>
+<br><tt>&nbsp;</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; // Create query object</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlQuery query = new NzdlQuery( myQueryString
+);</tt><tt></tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Create request object</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlRequest request = new NzdlRequest( query
+);</tt><tt></tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // create response object</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlResponse response = new NzdlResponse( );</tt>
+<br>&nbsp;
+<br><tt>&nbsp;&nbsp;&nbsp; // use service to get response from request
+to myCollection</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; myService.service( myCollection, request, response
+);</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // use getResultSet to get results from response</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; NzdlResultSet results = response.getResultSet();</tt><tt></tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // getNumOfDocs</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println("\nNumber of hits = "+results.getNumOfDocs());</tt><tt></tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Use getDocumentIDs to build list of titles
+(defaults: 1 - 10)</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; List docIDs = results.getDocumentIDs();</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println("\nThe titles:");</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; for (ListIterator i = docIDs.listIterator();
+i.hasNext(); )</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set metaData</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = myService.getMetaData(
+myCollection,(String)i.next(),"Title");</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Iterator j = metaData.iterator();</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(j.next());
+//print title metadata</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println("\nThe first document returned
+was:");</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; // Print first document returned</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; String myDoc</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = myService.getDocument(myCollection,(String)docIDs.get(0));</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; System.out.println(myDoc);</tt>
+<p><tt>&nbsp;&nbsp;&nbsp; } // end of main</tt>
+<br>&nbsp;
+<p><tt>&nbsp;&nbsp;&nbsp; // Read the IOR from a file</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; static private String getIor(String sourceOfID)
+{</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; String ior = null;</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; try</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BufferedReader input</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+= new BufferedReader(new FileReader(sourceOfID));</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ior = input.readLine();</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; catch (java.io.IOException e)</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println("Error
+reading IOR key:\n" + e);</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.exit(1);</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
+<br><tt>&nbsp;&nbsp;&nbsp; return ior;</tt>
+<br><tt>&nbsp; }&nbsp; //end of getIors</tt><tt></tt>
+<p><tt>} // end of demo class</tt>
+<br>&nbsp;
+</body>
+</html>
Index: /trunk/java-client/org/nzdl/gsdl/util/package.html
===================================================================
--- /trunk/java-client/org/nzdl/gsdl/util/package.html	(revision 2156)
+++ /trunk/java-client/org/nzdl/gsdl/util/package.html	(revision 2156)
@@ -0,0 +1,10 @@
+<html>
+<title>Utils Package</title>
+<body bgcolor="#FFFFFF">
+Contains:
+NzdlConstants a classthat holds constants and
+NzdlHosts a class for finding NZDL hosts and determining their Interoperable Object References.
+NzdlCorbaFactory
+
+</body>
+</html>
Index: /trunk/java-client/overview.html
===================================================================
--- /trunk/java-client/overview.html	(revision 2156)
+++ /trunk/java-client/overview.html	(revision 2156)
@@ -0,0 +1,16 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
+</head>
+<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
+The NZDL Java-Client interface is a package for writing java applications to communicate
+with the Greenstone Digital Library.
+<p>The interface is through Common Object Reference Broker Architecture
+(CORBA).
+<p>In order to communicate to Greenstone collections, this software requires that the
+server machine has Corbaserver installed and running.
+<br><tt></tt>&nbsp;
+</body>
+</html>
