Changeset 2220 for trunk/java-client


Ignore:
Timestamp:
2001-03-22T15:48:52+12:00 (23 years ago)
Author:
say1
Message:

change int-> long in a number of places, new createNzdlService method taking only an IOR, added the start of a hli (high level interface

Location:
trunk/java-client
Files:
6 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/Makefile

    r2187 r2220  
    2424
    2525org/nzdl/gsdl/corba/gsdlInterface/corbaiface.java : corbaiface.idl
    26     idlj -fclient -pkgPrefix gsdlInterface org.nzdl.gsdl.corba corbaiface.idl
    27     idlj -fserver -pkgPrefix gsdlInterface org.nzdl.gsdl.corba corbaiface.idl
     26    idlj  -verbose -fclient -pkgPrefix gsdlInterface org.nzdl.gsdl.corba corbaiface.idl
     27    idlj  -verbose -fserver -pkgPrefix gsdlInterface org.nzdl.gsdl.corba corbaiface.idl
    2828    javac org/nzdl/gsdl/corba/gsdlInterface/*.java
    2929
  • trunk/java-client/org/nzdl/gsdl/Makefile

    r2191 r2220  
    1010    (cd util && $(MAKE) all)
    1111    (cd ptp && $(MAKE) all)
     12    (cd hli && $(MAKE) all)
    1213    (cd SimpleGraphicalClient && $(MAKE) all)
    1314
     
    1718    (cd util && $(MAKE) clean)
    1819    (cd service && $(MAKE) clean)
     20    (cd hli && $(MAKE) clean)
    1921    (cd ptp && $(MAKE) clean)
    2022    rm -f *.class
  • trunk/java-client/org/nzdl/gsdl/SimpleClient.java

    r2216 r2220  
    216216    System.out.println("Searching collection: " + collName);
    217217     
    218       int numResults = collInfo.getNumOfDocs(); // what precisely is this number ?
     218      long numResults = collInfo.getNumOfDocs(); // what precisely is this number ?
    219219
    220220      if (verbosity > 2)
  • trunk/java-client/org/nzdl/gsdl/service/NzdlCollectionInfo.java

    r2196 r2220  
    139139   * @return An integer representing the number of documents in the collection.
    140140   */
    141   public int getNumOfDocs() {
     141  public long getNumOfDocs() {
    142142    return m_Info.numDocs;
    143143  }
     
    150150   * @return An integer representing the number of words in the collection.
    151151   */
    152   public int getNumOfWords() {
     152  public long getNumOfWords() {
    153153    return m_Info.numWords;
    154154  }
     
    161161   * @return An integer representing the number of bytes in the collection.
    162162   */
    163   public int getNumOfBytes() {
     163  public long getNumOfBytes() {
    164164    return m_Info.numBytes;
    165165  }
  • trunk/java-client/org/nzdl/gsdl/service/NzdlLogWrapper.java

    r2162 r2220  
    7171    }   
    7272  }
    73    
     73
    7474  protected void logBefore(String method) {
    7575    if (whenCallStarted != null)
  • trunk/java-client/org/nzdl/gsdl/service/NzdlMultiWayWrapper.java

    r2188 r2220  
    9797    return result;
    9898  }
    99    
     99
    100100  /**
    101101   * Allow the client to configure a CORBA server.
  • trunk/java-client/org/nzdl/gsdl/service/NzdlServiceClient.java

    r2202 r2220  
    9595  }
    9696
     97
    9798  /**
    9899   * Allow the client to configure a CORBA server.
  • trunk/java-client/org/nzdl/gsdl/util/NzdlServiceFactory.java

    r2217 r2220  
    300300    }
    301301
    302       System.err.println("1");
    303302    // try an IOR from the command line
    304303    if (_IOR != null) {
     
    309308    }
    310309   
    311       System.err.println("2");
    312310    // try an IOR from a file (the filename may have been
    313311    // given from the commandline
     
    321319    }
    322320   
    323       System.err.println("3");
    324321    // try the compiled-in URLs
    325322    for (int i=0;(urlsCompiledIn != null && i<urlsCompiledIn.length);i++) {
     
    332329    }
    333330
    334     System.err.println("4");
    335331    // the knownIORs is the last resort
    336332    IOR = NzdlServiceFactory.getFirstValid();
     
    546542    return nzdl;
    547543  }
    548    
     544  static public NzdlService createNzdlService(String _IOR) {
     545    Properties _props =  System.getProperties();
     546   
     547    NzdlService nzdl = null;
     548    String IOR = null;
     549   
     550    IOR = NzdlServiceFactory.registerIOR(_IOR);
     551    nzdl = attemptToInitialise(null, _props, IOR);
     552
     553    if (nzdl == null) {
     554      System.err.println("couldn't open the requested IOR: going for what we can ...");
     555      nzdl = createNzdlService(null,null,null,null,null);
     556    }
     557
     558   
     559    if (NzdlPreferences.getBoolean("Save documents"))
     560      nzdl = new NzdlDocSaveWrapper(nzdl);
     561   
     562    if (NzdlPreferences.getBoolean("Log at the NzdlService level"))
     563      nzdl = new NzdlLogWrapper(nzdl, "log.file.after.cache", "AFTER: ");
     564   
     565    if (NzdlPreferences.getBoolean("Cache corba requests"))
     566      nzdl = new NzdlCacheWrapper(nzdl);
     567
     568    if (NzdlPreferences.getBoolean("Log at the NzdlService level"))
     569      nzdl = new NzdlLogWrapper(nzdl, "log.file.before.cache", "BEFORE: ");
     570   
     571    return nzdl;
     572  }
     573   
    549574  /**
    550575   * Write the System properties to a file called "System.properties" in
Note: See TracChangeset for help on using the changeset viewer.