Changeset 3387


Ignore:
Timestamp:
11/19/07 12:20:27 (12 years ago)
Author:
curtis
Message:

Remove obsolete XML validation helper class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/MetadataTools.java

    r3197 r3387  
    2424 
    2525package loci.formats; 
    26  
    27 import org.xml.sax.ErrorHandler; 
    28 import org.xml.sax.SAXParseException; 
    2926 
    3027/** 
     
    9693   * to the given OME-XML metadata object. 
    9794   * Does nothing unless the given object is an OME-XML metadata object. 
    98    * @param o An object of type {@link loci.formats.ome.OMEXMLMetadata}. 
     95   * @param omexmlMeta An object of type 
     96   *   {@link loci.formats.ome.OMEXMLMetadata}. 
    9997   * @param key Metadata key to populate. 
    10098   * @param value Metadata value corresponding to the specified key. 
    10199   */ 
    102   public static void populateOriginalMetadata(Object o, 
     100  public static void populateOriginalMetadata(Object omexmlMeta, 
    103101    String key, String value) 
    104102  { 
    105103    ReflectedUniverse r = new ReflectedUniverse(); 
    106     r.setVar("omexmlMeta", o); 
     104    r.setVar("omexmlMeta", omexmlMeta); 
    107105    r.setVar("key", key); 
    108106    r.setVar("value", value); 
     
    315313  } 
    316314 
    317   // -- Helper classes -- 
    318  
    319   /** Used by testRead to handle XML validation errors. */ 
    320   private static class ValidationHandler implements ErrorHandler { 
    321     private boolean ok = true; 
    322     public boolean ok() { return ok; } 
    323     public void error(SAXParseException e) { 
    324       LogTools.println("error: " + e.getMessage()); 
    325       ok = false; 
    326     } 
    327     public void fatalError(SAXParseException e) { 
    328       LogTools.println("fatal error: " + e.getMessage()); 
    329       ok = false; 
    330     } 
    331     public void warning(SAXParseException e) { 
    332       LogTools.println("warning: " + e.getMessage()); 
    333       ok = false; 
    334     } 
    335   } 
    336  
    337315} 
Note: See TracChangeset for help on using the changeset viewer.