Changeset 2084


Ignore:
Timestamp:
01/12/07 14:54:13 (13 years ago)
Author:
curtis
Message:

Change "Filename" metadata parameter name to "OME address" or "URL"
depending on dataset location type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r2082 r2084  
    5959  private static final String VIEW_VIEW_5D = "View5D"; 
    6060 
    61   private static final String LOCAL_FILE = "Local machine"; 
    62   private static final String OME_FILE = "OME server"; 
    63   private static final String HTTP_FILE = "Internet"; 
     61  private static final String LOCATION_LOCAL = "Local machine"; 
     62  private static final String LOCATION_OME = "OME server"; 
     63  private static final String LOCATION_HTTP = "Internet"; 
    6464 
    6565  // -- Fields -- 
     
    120120        gd = new GenericDialog("LOCI Bio-Formats Dataset Location"); 
    121121        gd.addChoice("Location: ", 
    122           new String[] {LOCAL_FILE, OME_FILE, HTTP_FILE}, LOCAL_FILE); 
     122          new String[] {LOCATION_LOCAL, LOCATION_OME, LOCATION_HTTP}, LOCATION_LOCAL); 
    123123        gd.showDialog(); 
    124124        if (gd.wasCanceled()) { 
     
    129129      } 
    130130 
    131       if (location.equals(LOCAL_FILE)) { 
     131      if (LOCATION_LOCAL.equals(location)) { 
    132132        // if necessary, prompt the user for the filename 
    133133        OpenDialog od = new OpenDialog("Open", id); 
     
    149149        } 
    150150      } 
    151       else if (location.equals(OME_FILE)) { 
     151      else if (LOCATION_OME.equals(location)) { 
    152152        IJ.runPlugIn("loci.plugins.ome.OMEPlugin", ""); 
    153153        return; 
    154154      } 
    155       else if (location.equals(HTTP_FILE)) { 
     155      else if (LOCATION_HTTP.equals(location)) { 
    156156        // prompt for URL 
    157157        gd = new GenericDialog("LOCI Bio-Formats URL"); 
     
    167167      else IJ.error("LOCI Bio-Formats", "Invalid location: " + location); 
    168168    } 
     169 
     170    String idType = "ID"; 
     171    if (LOCATION_LOCAL.equals(location)) idType = "Filename"; 
     172    else if (LOCATION_OME.equals(location)) idType = "OME address"; 
     173    else if (LOCATION_HTTP.equals(location)) idType = "URL"; 
    169174 
    170175    // -- Step 2: identify file -- 
     
    506511        // display standard metadata in a table in its own window 
    507512        Hashtable meta = r.getMetadata(id); 
    508         meta.put("\t\tFilename", r.getCurrentFile()); 
     513        meta.put("\t\t" + idType, r.getCurrentFile()); 
    509514        meta.put("\tSizeX", new Integer(r.getSizeX(id))); 
    510515        meta.put("\tSizeY", new Integer(r.getSizeY(id))); 
Note: See TracChangeset for help on using the changeset viewer.