Changeset 7402


Ignore:
Timestamp:
12/11/10 13:49:08 (9 years ago)
Author:
melissa
Message:

Moved missing OME-XML messages into OMEXMLServiceImpl. Closes #604.

Location:
trunk/components/bio-formats/src/loci/formats
Files:
6 edited

Legend:

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

    r7157 r7402  
    5050import loci.formats.ome.OMEXMLMetadata; 
    5151import loci.formats.services.OMEXMLService; 
     52import loci.formats.services.OMEXMLServiceImpl; 
    5253import loci.formats.tiff.IFD; 
    5354import loci.formats.tiff.IFDList; 
     
    6465 */ 
    6566public class OMETiffReader extends FormatReader { 
    66  
    67   // -- Constants -- 
    68  
    69   public static final String NO_OME_XML_MSG = 
    70     "ome-xml.jar is required to read OME-TIFF files.  " + 
    71     "Please download it from " + FormatTools.URL_BIO_FORMATS_LIBRARIES; 
    7267 
    7368  // -- Fields -- 
     
    700695    } 
    701696    catch (DependencyException de) { 
    702       throw new MissingLibraryException(NO_OME_XML_MSG, de); 
     697      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    703698    } 
    704699  } 
  • trunk/components/bio-formats/src/loci/formats/in/OMEXMLReader.java

    r6881 r7402  
    4949import loci.formats.ome.OMEXMLMetadata; 
    5050import loci.formats.services.OMEXMLService; 
     51import loci.formats.services.OMEXMLServiceImpl; 
    5152 
    5253import org.xml.sax.Attributes; 
     
    6566public class OMEXMLReader extends FormatReader { 
    6667 
    67   // -- Constants -- 
    68  
    69   public static final String NO_OME_XML_MSG = 
    70     "The Java OME-XML library is required to read OME-XML files. Please " + 
    71     "obtain ome-xml.jar from " + FormatTools.URL_BIO_FORMATS_LIBRARIES; 
    72  
    7368  // -- Static fields -- 
    7469 
     
    8176    catch (Throwable t) { 
    8277      noOME = true; 
    83       LOGGER.debug(NO_OME_XML_MSG, t); 
     78      LOGGER.debug(OMEXMLServiceImpl.NO_OME_XML_MSG, t); 
    8479    } 
    8580  } 
     
    212207  /* @see loci.formats.FormatReader#initFile(String) */ 
    213208  protected void initFile(String id) throws FormatException, IOException { 
    214     if (noOME) throw new MissingLibraryException(NO_OME_XML_MSG); 
     209    if (noOME) { 
     210      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG); 
     211    } 
    215212    super.initFile(id); 
    216213 
     
    257254    } 
    258255    catch (DependencyException de) { 
    259       throw new MissingLibraryException(NO_OME_XML_MSG, de); 
     256      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    260257    } 
    261258    catch (ServiceException se) { 
  • trunk/components/bio-formats/src/loci/formats/out/OMEXMLWriter.java

    r7225 r7402  
    4646import loci.formats.meta.MetadataRetrieve; 
    4747import loci.formats.services.OMEXMLService; 
     48import loci.formats.services.OMEXMLServiceImpl; 
    4849 
    4950import org.xml.sax.Attributes; 
     
    8788    } 
    8889    catch (DependencyException de) { 
    89       throw new MissingLibraryException(OMETiffReader.NO_OME_XML_MSG, de); 
     90      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    9091    } 
    9192    catch (ServiceException se) { 
  • trunk/components/bio-formats/src/loci/formats/services/OMEXMLServiceImpl.java

    r7357 r7402  
    3636import loci.common.services.ServiceException; 
    3737import loci.common.xml.XMLTools; 
     38import loci.formats.FormatTools; 
    3839import loci.formats.MetadataTools; 
    3940import loci.formats.meta.IMetadata; 
     
    7576{ 
    7677 
     78  public static final String NO_OME_XML_MSG = 
     79    "ome-xml.jar is required to read OME-TIFF files.  " + 
     80    "Please download it from " + FormatTools.URL_BIO_FORMATS_LIBRARIES; 
     81 
    7782  /** Logger for this class. */ 
    7883  private static final Logger LOGGER = 
  • trunk/components/bio-formats/src/loci/formats/tools/ImageConverter.java

    r7183 r7402  
    5353import loci.formats.out.TiffWriter; 
    5454import loci.formats.services.OMEXMLService; 
     55import loci.formats.services.OMEXMLServiceImpl; 
    5556 
    5657import org.slf4j.Logger; 
     
    213214    } 
    214215    catch (DependencyException de) { 
    215       throw new MissingLibraryException(OMETiffReader.NO_OME_XML_MSG, de); 
     216      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    216217    } 
    217218    catch (ServiceException se) { 
  • trunk/components/bio-formats/src/loci/formats/tools/ImageInfo.java

    r7256 r7402  
    6262import loci.formats.meta.MetadataStore; 
    6363import loci.formats.services.OMEXMLService; 
     64import loci.formats.services.OMEXMLServiceImpl; 
    6465 
    6566import org.slf4j.Logger; 
     
    331332      } 
    332333      catch (DependencyException de) { 
    333         throw new MissingLibraryException(OMETiffReader.NO_OME_XML_MSG, de); 
     334        throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    334335      } 
    335336      catch (ServiceException se) { 
     
    864865    } 
    865866    catch (DependencyException de) { 
    866       throw new MissingLibraryException(OMETiffReader.NO_OME_XML_MSG, de); 
     867      throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de); 
    867868    } 
    868869    String version = service.getOMEXMLVersion(ms); 
Note: See TracChangeset for help on using the changeset viewer.