@Test public void testCreateExporterForL1CProduct() throws IOException { final FormatExporter exporter = FormatExporterFactory.create("SM_REPB_MIR_SCLF1C_20110201T151254_20110201T151308_505_152_1.hdr"); assertThat(exporter, is(instanceOf(L1CFormatExporter.class))); }
public static FormatExporter create(String fileName) throws IOException { if (SmosUtils.isBrowseFormat(fileName)) { return new BrowseFormatExporter(); } else if (SmosUtils.isL1cType(fileName)) { return new L1CFormatExporter(); } else if (SmosUtils.isOsUserFormat(fileName) || SmosUtils.isSmUserFormat(fileName)) { return new L2FormatExporter(); } throw new IOException("Unsupported export for file:" + fileName); }
FormatExporterFactory { public static FormatExporter create(String fileName) throws IOException { if (SmosUtils.isBrowseFormat(fileName)) { return new BrowseFormatExporter(); } else if (SmosUtils.isL1cType(fileName)) { return new L1CFormatExporter(); } else if (SmosUtils.isOsUserFormat(fileName) || SmosUtils.isSmUserFormat(fileName)) { return new L2FormatExporter(); } throw new IOException("Unsupported export for file:" + fileName); } }
FormatExporterFactory { public static FormatExporter create(String fileName) throws IOException { if (SmosUtils.isBrowseFormat(fileName)) { return new BrowseFormatExporter(); } else if (SmosUtils.isL1cType(fileName)) { return new L1CFormatExporter(); } else if (SmosUtils.isOsUserFormat(fileName) || SmosUtils.isSmUserFormat(fileName)) { return new L2FormatExporter(); } throw new IOException("Unsupported export for file:" + fileName); }  }
FormatExporterFactory { public static FormatExporter create(String fileName) throws IOException { if (SmosUtils.isBrowseFormat(fileName)) { return new BrowseFormatExporter(); } else if (SmosUtils.isL1cType(fileName)) { return new L1CFormatExporter(); } else if (SmosUtils.isOsUserFormat(fileName) || SmosUtils.isSmUserFormat(fileName)) { return new L2FormatExporter(); } throw new IOException("Unsupported export for file:" + fileName); }  static FormatExporter create(String fileName); }
FormatExporterFactory { public static FormatExporter create(String fileName) throws IOException { if (SmosUtils.isBrowseFormat(fileName)) { return new BrowseFormatExporter(); } else if (SmosUtils.isL1cType(fileName)) { return new L1CFormatExporter(); } else if (SmosUtils.isOsUserFormat(fileName) || SmosUtils.isSmUserFormat(fileName)) { return new L2FormatExporter(); } throw new IOException("Unsupported export for file:" + fileName); }  static FormatExporter create(String fileName);  }