Changeset 5629


Ignore:
Timestamp:
10/26/09 14:03:39 (10 years ago)
Author:
melissa
Message:
  • Initial version of enumeration interfaces.
  • Added MetadataTools.getLatestVersion(), for retrieving the latest supported OME-XML version.
Location:
trunk/components/bio-formats/src/loci/formats
Files:
7 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/MetadataTools.java

    r5609 r5629  
    7575 
    7676  /** 
     77   * Retrieves the latest supported version of the OME-XML schema. 
     78   */ 
     79  public static String getLatestVersion() { 
     80    ReflectedUniverse r = new ReflectedUniverse(); 
     81    try { 
     82      r.exec("import ome.xml.OMEXMLFactory"); 
     83      return (String) r.exec("OMEXMLFactory.LATEST_VERSION"); 
     84    } 
     85    catch (ReflectException e) { 
     86      LogTools.traceDebug(e); 
     87    } 
     88    return null; 
     89  } 
     90 
     91  /** 
    7792   * Creates an OME-XML metadata object using reflection, to avoid 
    7893   * direct dependencies on the optional {@link loci.formats.ome} package. 
     
    117132        if (ome == null) { 
    118133          // default to newest schema version 
    119           r.exec("import ome.xml.OMEXMLFactory"); 
    120           version = (String) r.exec("OMEXMLFactory.LATEST_VERSION"); 
     134          version = getLatestVersion(); 
    121135        } 
    122136        else { 
Note: See TracChangeset for help on using the changeset viewer.