Changeset 2099


Ignore:
Timestamp:
01/16/07 07:56:10 (13 years ago)
Author:
melissa
Message:

Prepend series name to each key in metadata hashtable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/LIFReader.java

    r2050 r2099  
    295295    Vector extraDims = new Vector(); 
    296296 
     297    String prefix = ""; 
     298 
    297299    while (ndx < elements.size()) { 
    298300      token = (String) elements.get(ndx); 
     
    306308        key = token.substring(0, token.indexOf(" ")).trim(); 
    307309        int count = 1; 
    308         while (metadata.containsKey(key)) { 
     310        while (metadata.containsKey(prefix + " - " + key)) { 
    309311          if (key.indexOf(" ") != -1) key = key.substring(0, key.indexOf(" ")); 
    310312          key = key + " " + count; 
     
    312314        } 
    313315        value = token.substring(token.indexOf(" ") + 1).trim(); 
    314         metadata.put(key, value); 
     316        metadata.put(prefix + " - " + key, value); 
    315317      } 
    316318      token = tmpToken; 
     
    372374              seriesNames.setElementAt(token.substring(token.indexOf("=") + 2, 
    373375                token.length() - 1), seriesNames.size() - 1); 
     376              prefix = (String) seriesNames.get(seriesNames.size() - 1); 
    374377            } 
    375378             
Note: See TracChangeset for help on using the changeset viewer.