Changeset 2262


Ignore:
Timestamp:
2001-04-03T02:31:21+12:00 (23 years ago)
Author:
say1
Message:

testing collections with ping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/CSModel.java

    r2225 r2262  
    156156        Iterator collectionSetIterator = orderedCollectionSet.iterator();
    157157        while (collectionSetIterator.hasNext() ) {
    158             // object -> String
    159             String collectionName = (String)collectionSetIterator.next();
    160             NzdlCollectionInfo info = nzdl.getCollectionInfo(collectionName);
    161             if (info != null &&
    162             info.getBuildDate() != 0) {
    163             collectionInfoMap.put(collectionName, info);
    164             String longCollectionName = "";
    165             Set n = nzdl.getMetaData(collectionName, "collection", "collectionname");
    166             if (n.size() == 1)
     158          // object -> String
     159          String collectionName = (String)collectionSetIterator.next();
     160          NzdlCollectionInfo info = nzdl.getCollectionInfo(collectionName);
     161
     162          if (info != null &&
     163              info.getBuildDate() != 0 &&
     164              nzdl.pingCollection(collectionName)) {
     165            collectionInfoMap.put(collectionName, info);
     166            String longCollectionName = "";
     167            Set n = nzdl.getMetaData(collectionName, "collection", "collectionname");
     168            if (n.size() == 1)
    167169                longCollectionName = (String) n.toArray()[0];
    168             else
     170            else
    169171                longCollectionName = collectionName + " has more than 1 collectionname";
    170             collectionNameMap.put(collectionName,longCollectionName );
    171             System.err.println("Adding " + collectionName + " to collection list...");
     172            collectionNameMap.put(collectionName,longCollectionName );
     173            System.err.println("Adding " + collectionName + " to collection list...");
    172174            } // end if
    173175            else {
Note: See TracChangeset for help on using the changeset viewer.