Changeset 2321 for trunk/java-client
- Timestamp:
- 2001-04-18T00:53:16+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-client/org/nzdl/gsdl/service/package.html
r2163 r2321 50 50 <li> 51 51 a <b>NzdlService</b> object to service CORBA interface requests 52 to 53 a Greenstone collection</li> 52 to a Greenstone collection</li> 54 53 </ul> 55 54 … … 76 75 <p>In order to function, this app needs Corbaserver running on the same 77 76 machine. 77 <br> 78 78 <p><tt>/**</tt> 79 79 <br><tt>* TrivialDemo.java.</tt> … … 91 91 <br><tt>import java.lang.*;</tt> 92 92 <br><tt>import org.nzdl.gsdl.service.*; //the java-client stuff</tt> 93 <br><tt>import org.nzdl.gsdl.util.Nzdl IORs; //for obtaining the IOR</tt>93 <br><tt>import org.nzdl.gsdl.util.NzdlServiceFactory</tt> 94 94 <p><tt>public class TrivialDemo {</tt> 95 95 <br><tt> public static void main( String [] args )</tt> 96 96 <br><tt> {</tt> 97 <br><tt> String myIorFile = "/tmp/localcorba.objid";</tt>98 97 <br><tt> String myQueryString = "snail farming";</tt> 99 98 <br><tt> String myCollection = "demo";</tt> 100 99 <p><tt> // Create a Service Object</tt> 101 <br><tt> NzdlService myService = NzdlIORs.findIOR(null, 102 null,</tt> 103 <br><tt> 104 myIorFile, null);</tt> 100 <br><tt> NzdlService myService = NzdlServiceFactory.CreateNzdlService(args,</tt> 101 <br><tt> 102 System.getProperties(), null, null, null);</tt> 105 103 <p><tt> // Use getCollectionSet to obtain List of Collections</tt> 106 104 <br><tt> Set myCollections = myService.getCollectionSet();</tt> … … 115 113 "+ collName);</tt> 116 114 <br><tt> }</tt> 117 <p><tt> // Find The Number of documents in my collection</tt>118 <br><tt> NzdlCollectionInfo myInfo = myService.getCollectionInfo(myCollection);</tt>119 <br><tt> System.out.println("\nNum Of Collection docs120 = "+myInfo.getNumOfDocs());</tt>121 115 <p><tt> // Create query object</tt> 122 116 <br><tt> NzdlQuery query = new NzdlQuery( myQueryString … … 158 152 <br><tt>} // end of demo class</tt> 159 153 <br> 154 <br> 160 155 </body> 161 156 </html>
Note:
See TracChangeset
for help on using the changeset viewer.