| 19 | | George Buchanan <g.buchanan@mdx.ac.uk> |
|---|
| | 19 | George Buchanan <g.buchanan@cs.ucl.ac.uk> |
|---|
| | 20 | |
|---|
| | 21 | ************ |
|---|
| | 22 | |
|---|
| | 23 | The NZDL Java-Client interface is a package for writing java applications to |
|---|
| | 24 | communicate with the Greenstone Digital Library. |
|---|
| | 25 | |
|---|
| | 26 | The interface is through Common Object Reference Broker Architecture (CORBA). |
|---|
| | 27 | In order to communicate to Greenstone collections, this software requires that |
|---|
| | 28 | the server machine has Corbaserver installed and running. |
|---|
| | 29 | |
|---|
| | 30 | ************ |
|---|
| | 31 | |
|---|
| | 32 | 1. Introduction |
|---|
| | 33 | |
|---|
| | 34 | It is now possible to access Greenstone collections using the Corba |
|---|
| | 35 | protocol and a Java client. |
|---|
| | 36 | |
|---|
| | 37 | ** |
|---|
| | 38 | |
|---|
| | 39 | As a Java programmer it is not necessary to understand Corba at all - |
|---|
| | 40 | as the Corba complexity has been reduced to a series of Java objects, |
|---|
| | 41 | methods and interfaces. |
|---|
| | 42 | |
|---|
| | 43 | ** |
|---|
| | 44 | |
|---|
| | 45 | To demonstrate how to use the Nzdl classes we have created an |
|---|
| | 46 | application, SimpleGraphicalClient, which can query a Corba server |
|---|
| | 47 | and display the resulting documents. This client is probably a |
|---|
| | 48 | good starting point to using Java with the NZDL. |
|---|
| | 49 | |
|---|
| | 50 | |
|---|
| | 51 | 2. Getting the code |
|---|
| | 52 | |
|---|
| | 53 | |
|---|
| | 54 | 2.1 Getting the SimpleGraphicalClient application source code |
|---|
| | 55 | |
|---|
| | 56 | cvs -d :pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src checkout java-client |
|---|
| | 57 | cd java-client |
|---|
| | 58 | make |
|---|
| | 59 | |
|---|
| | 60 | 2.2 Getting the Server |
|---|
| | 61 | |
|---|
| | 62 | cvs :pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src checkout gsdl |
|---|
| | 63 | cd gsdl |
|---|
| | 64 | ./configure --enable-corba |
|---|
| | 65 | make |
|---|
| | 66 | make install |
|---|
| | 67 | |
|---|
| | 68 | (anything else??) |
|---|
| | 69 | |
|---|
| | 70 | 3. Running the client |
|---|
| | 71 | |
|---|
| | 72 | It is important to get the directories correct - as Java |
|---|
| | 73 | uses them to manage the namespace of the classes. So you |
|---|
| | 74 | should have something that looks like: |
|---|
| | 75 | |
|---|
| | 76 | java-client/org/nzdl/gsdl/ |
|---|
| | 77 | |
|---|
| | 78 | In this directory you will find: |
|---|
| | 79 | |
|---|
| | 80 | corba - directory, lots of nasty corba stuff, avoid |
|---|
| | 81 | service - the java classes you use, no need to look at this |
|---|
| | 82 | SimpleClient.java - early test application |
|---|
| | 83 | SimpleGraphicalClient - directory, the Java package |
|---|
| | 84 | |
|---|
| | 85 | Run: |
|---|
| | 86 | java org.nzdl.gsdl.SimpleGraphicalClient.SimpleGraphicalClient |
|---|
| | 87 | |
|---|
| | 88 | |
|---|
| | 89 | 4. Running the server |
|---|
| | 90 | |
|---|
| | 91 | corbaserver -ORBNoCodeSets |
|---|
| | 92 | |
|---|