Changeset 2203 for trunk/java-client/org/nzdl
- Timestamp:
- 2001-03-20T14:39:48+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-client/org/nzdl/gsdl/SearchAllCollections.java
r2119 r2203 61 61 * 62 62 * @author Gordon Paynter ([email protected]) 63 * @author stuart yeates ([email protected])63 * @author Stuart Yeates ([email protected]) 64 64 * @author Dave Nichols ([email protected]) 65 65 * @version $Revision$ … … 288 288 String collectionName = (String) collectionSetIterator.next(); 289 289 if (nzdl.hasCollection(collectionName) ) { 290 if (nzdl.pingCollection(collectionName) ) { 291 queryCollection(collectionName, queryText); 292 } 290 // if (nzdl.pingCollection(collectionName) ) { 291 292 // ping is broken, so use builddate to decide whether this 293 // collection is valid 294 NzdlCollectionInfo info = nzdl.getCollectionInfo(collectionName); 295 if (info != null && info.getBuildDate() != 0) { 296 queryCollection(collectionName, queryText); 297 } 298 // } 293 299 } 294 300 } 295 301 } 296 297 302 298 303 void queryCollection(String collectionName, String queryText) … … 308 313 int frequency = response.getResultSet().getNumOfDocs(); 309 314 if (frequency > 0) { 310 System.out.println(" ------------------------------");315 System.out.println("\n------------------------------"); 311 316 System.out.println(frequency + "\t" + collectionName); 312 317 describeCollection(collectionName); … … 316 321 void describeCollection(String collectionName) { 317 322 318 String document = nzdl.getDocument(collectionName, "collection"); 319 System.out.println(document); 320 321 Set s = nzdl.getMetaData(collectionName, "document", "collectionextra"); 322 /* 323 Iterator setIterator = s.iterator(); 324 while (setIterator.hasNext() ) { 325 String value = (String) setIterator.next(); 326 System.out.println("collectionextra: " + value + "\n---\n"); 323 // collection name 324 Set n = nzdl.getMetaData(collectionName, "collection", "collectionname"); 325 if (n.size() == 1) { 326 System.out.println("\nName: " + n.toArray()[0]); 327 } 328 329 // collection description 330 Set d = nzdl.getMetaData(collectionName, "collection", "collectionextra"); 331 if (d.size() == 1) { 332 String value = (String) d.toArray()[0]; 333 if (value.length() > 0) { 334 System.out.println("Description: " + value); 327 335 } 328 */ 329 336 } 337 338 // basic collection information 339 NzdlCollectionInfo info = nzdl.getCollectionInfo(collectionName); 340 System.out.println("Info: " + info); 330 341 } 331 342
Note:
See TracChangeset
for help on using the changeset viewer.