Changeset 2838


Ignore:
Timestamp:
05/31/07 11:15:47 (13 years ago)
Author:
melissa
Message:

Fixed serious bugs with uploading to/downloading from OME servers whose names are set to "localhost".

Location:
trunk/loci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ome/OMEReader.java

    r2693 r2838  
    110110 
    111111    currentId = server + ":" + imageId; 
    112  
     112     
     113    String omeis = "http://" + server + "/cgi-bin/omeis"; 
    113114    server = "http://" + server + "/shoola/"; 
    114115 
     
    147148    Image img = (Image) df.retrieveList(Image.class, c).get(0); 
    148149    pixels = img.getDefaultPixels(); 
     150    pixels.getRepository().setImageServerURL(omeis); 
    149151 
    150152    try { 
  • trunk/loci/formats/ome/OMEWriter.java

    r2801 r2838  
    150150      try { 
    151151        r = pf.findRepository(0); 
     152        r.setImageServerURL(omeis); 
    152153      } 
    153154      catch (Exception e) { 
     
    255256      logical.setFluor("Gray 00"); 
    256257      logical.setPhotometricInterpretation("monochrome"); 
    257       df.markForUpdate(logical); 
     258      df.update(logical); 
    258259 
    259260      PixelChannelComponent physical = 
     
    264265      physical.setLogicalChannel(logical); 
    265266      physical.setModuleExecution(ii); 
    266       df.markForUpdate(physical); 
     267      df.update(physical); 
    267268 
    268269      ii.setStatus("FINISHED"); 
    269       df.markForUpdate(ii); 
     270      df.update(ii); 
    270271 
    271272      img.setDefaultPixels(pixels); 
  • trunk/loci/ome/util/OMEUtils.java

    r2725 r2838  
    3939  private static RemoteCaller rc; 
    4040  private static DataServices rs; 
     41  private static String omeis; 
    4142 
    4243  // -- Utils API methods -- 
     
    4647    throws MalformedURLException 
    4748  { 
     49    omeis = server; 
     50    if (omeis.indexOf("http://") != -1) { 
     51      omeis = omeis.substring(7, omeis.length()); 
     52    } 
     53    omeis = "http://" + omeis.substring(0, omeis.indexOf("/")) +  
     54      "/cgi-bin/omeis"; 
     55 
    4856    rs = DataServer.getDefaultServices(server); 
    4957    rc = rs.getRemoteCaller(); 
     
    5866    throws MalformedURLException 
    5967  { 
     68    omeis = server; 
     69    if (omeis.indexOf("http://") != -1) { 
     70      omeis = omeis.substring(7, omeis.length()); 
     71    } 
     72    omeis = "http://" + omeis.substring(0, omeis.indexOf("/")) +  
     73      "/cgi-bin/omeis"; 
     74     
    6075    rs = DataServer.getDefaultServices(server); 
    6176    rc = rs.getRemoteCaller(); 
     
    139154        images[i].getCreated(); 
    140155      p = images[i].getDefaultPixels(); 
     156 
     157      Repository r = p.getRepository(); 
     158      r.setImageServerURL(omeis);  
     159      p.setRepository(r); 
    141160 
    142161      if (p == null) continue; 
Note: See TracChangeset for help on using the changeset viewer.