SmosUtils { public static boolean isAuxFileType(String fileName) { return fileName.matches("SM_.{4}_AUX_APOD01_.{44}") || fileName.matches("SM_.{4}_AUX_AGDPT__.{45}") || fileName.matches("SM_.{4}_AUX_APD[LS](00|__)_.{45}") || fileName.matches("SM_.{4}_AUX_ATMOS__.{45}") || fileName.matches("SM_.{4}_AUX_BFP____.{44,45}") || fileName.matches("SM_.{4}_AUX_BNDLST_.{45}") || fileName.matches("SM_.{4}_AUX_BSCAT__.{44,45}") || fileName.matches("SM_.{4}_AUX_BWGHT__.{44,45}") || fileName.matches("SM_.{4}_AUX_CNF(L0P|L1P|SMD|SMF|OSD|OSF)_.{45}") || fileName.matches("SM_.{4}_AUX_DFFFRA_.{45}") || fileName.matches("SM_.{4}_AUX_D(FF|GG)XYZ_.{45}") || fileName.matches("SM_.{4}_AUX_DFFL(AI|MX)_.{45}") || fileName.matches("SM_.{4}_AUX_DGG____.{44,45}") || fileName.matches("SM_.{4}_AUX_DGGT(LV|FO)_.{45}") || fileName.matches("SM_.{4}_AUX_DGGR(OU|FI)_.{45}") || fileName.matches("SM_.{4}_AUX_DGGFLO_.{45}") || fileName.matches("SM_.{4}_AUX_DISTAN_.{45}") || fileName.matches("SM_.{4}_AUX_ECOLAI_.{45}") || fileName.matches("SM_.{4}_AUX_FAIL___.{44,45}") || fileName.matches("SM_.{4}_AUX_FLATT__.{44}") || fileName.matches("SM_.{4}_AUX_FLTSEA_.{45}") || fileName.matches("SM_.{4}_AUX_FOAM___.{45}") || fileName.matches("SM_.{4}_AUX_GALAXY_.{45}") || fileName.matches("SM_.{4}_AUX_GALNIR_.{45}") || fileName.matches("SM_.{4}_AUX_GAL(_|2)(SM|OS)_.{45}") || fileName.matches("SM_.{4}_AUX_GLXY___.{45}") || fileName.matches("SM_.{4}_AUX_IGRF___.{45}") || fileName.matches("SM_.{4}_AUX_LCF____.{44,45}") || fileName.matches("SM_.{4}_AUX_MASK___.{44,45}") || fileName.matches("SM_.{4}_AUX_MISP___.{45}") || fileName.matches("SM_.{4}_AUX_LANDCL_.{45}") || fileName.matches("SM_.{4}_AUX_LSMASK_.{44,45}") || fileName.matches("SM_.{4}_AUX_MN_WEF_.{45}") || fileName.matches("SM_.{4}_AUX_MOONT__.{44,45}") || fileName.matches("SM_.{4}_AUX_NIR____.{44,45}") || fileName.matches("SM_.{4}_AUX_ORBPRE_.{45}") || fileName.matches("SM_.{4}_AUX_ORBRES_.{45}") || fileName.matches("SM_.{4}_AUX_PATT[0-9_][0-9_]_.{44,45}") || fileName.matches("SM_.{4}_AUX_PLM____.{45,46}") || fileName.matches("SM_.{4}_AUX_PMS____.{44,45}") || fileName.matches("SM_.{4}_AUX_RFI____.{44,45}") || fileName.matches("SM_.{4}_AUX_RGHNS[1-3]_.{45}") || fileName.matches("SM_.{4}_AUX_SOIL_P_.{45}") || fileName.matches("SM_.{4}_AUX_SPAR___.{44,45}") || fileName.matches("SM_.{4}_AUX_SSS____.{45}") || fileName.matches("SM_.{4}_AUX_VTEC___.{45}") || fileName.matches("SM_.{4}_AUX_SUNT___.{44,45}") || fileName.matches("SM_.{4}_AUX_SGLINT_.{45}") || fileName.matches("SM_.{4}_AUX_TIME___.{45}") || fileName.matches("SM_.{4}_AUX_VTEC_[CPR]_.{45}") || fileName.matches("SM_.{4}_AUX_WEF____.{45}") || fileName.matches("SM_.{4}_AUX_CNFFAR_.{45}") || fileName.matches("SM_.{4}_AUX_BULL_B_.{45}") || fileName.matches("SM_.{4}_AUX_OTT(1|2|3)(D|F)__.{45}") || fileName.matches("SM_.{4}_AUX_ECMWF__.{45}"); }  static File findDblFile(File[] zipFiles); static Date getSensingStartDayFromFilename(String fileName); static Date getSensingStartTimeFromFilename(String fileName); static Date getSensingStopTimeFromFilename(String fileName); static String getProductType(String fileName); static boolean isDblFileName(String fileName); static boolean isHdrFileName(String fileName); static boolean isL0Type(String fileName); static boolean isL1aType(String fileName); static boolean isL1bType(String fileName); static boolean isL1cType(String fileName); static boolean isLightBufrType(String fileName); static boolean isLightBufrTypeSupported(); static boolean isL2Type(String fileName); static boolean isAuxFileType(String fileName); static boolean isQualityControlType(String fileName); static boolean isMirasPlanType(String fileName); static boolean isAuxECMWFType(String fileName); static boolean isOsAnalysisFormat(String formatName); static boolean isOsUserFormat(String formatName); static boolean isSmAnalysisFormat(String formatName); static boolean isSmUserFormat(String formatName); static boolean isDualPolBrowseFormat(String formatName); static boolean isFullPolBrowseFormat(String formatName); static boolean isBrowseFormat(String formatName); static boolean isDualPolScienceFormat(String formatName); static boolean isFullPolScienceFormat(String formatName); @SuppressWarnings("SimplifiableIfStatement") static boolean isCompressedFile(File file); static boolean isDggTlvFormat(String formatName); static boolean isDggTfoFormat(String formatName); static boolean isDggRouFormat(String formatName); static boolean isDggRfiFormat(String formatName); static boolean isDggFloFormat(String formatName); static boolean isLsMaskFormat(String formatName); static boolean isVTecFormat(String formatName); static boolean isDffLaiFormat(String formatName); static boolean isL2Format(String formatName);  }
@Test public void testIsAuxFileType() { assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ORBPRE_20121117T000000_20121124T000000_240_034_1.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_APOD01_20070101T000000_20781231T235959_00000002.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_BFP____20070101T000000_20781231T235959_00000003.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_BSCAT__20070101T000000_20781231T235959_00000002.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_BWGHT__20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_CNFL1P_20120101T000000_20500101T000000_101_001_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGG____20050101T000000_20500101T000000_001_002_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGG____20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_FAIL___20070101T000000_20781231T235959_00000002.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_FLATT__20070101T000000_20781231T235959_00000014.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_GALAXY_20050101T000000_20500101T000000_001_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_GLXY___20070101T000000_20781231T235959_000000007.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_GALNIR_20050101T000000_20500101T000000_300_001_5.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_LCF____20070101T000000_20781231T235959_00000004.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_MASK___20050101T000000_20500101T000000_001_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_MASK___20070101T000000_20781231T235959_00000006.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_MOONT__20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_NIR____20070101T000000_20781231T235959_00000006.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_PLM____20070101T000000_20781231T235959_0000000012.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_PMS____20070101T000000_20781231T235959_00000005.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_VTEC___20080102T010000_20080102T025959_105_001_0.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_RFI____20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_IGRF___20080102T010000_20080102T025959_105_001_0.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_SPAR___20070101T000000_20781231T235959_00000006.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_SUNT___20050101T000000_20500101T000000_001_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_SUNT___20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_SGLINT_20050101T000000_20500101T000000_001_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_TIME___20050101T000000_20500101T000000_001_001_4.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_VTEC_C_20080102T010000_20080102T025959_105_001_0.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_VTEC_P_20080414T010000_20080414T025959_105_001_0.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_PATT99_20070101T000000_20781231T235959_00000006.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_PATT12_20070101T000000_20781231T235959_00000004.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ORBPRE_20121117T000000_20121124T000000_240_034_1.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_APDS00_20050101T000000_20500101T000000_001_001_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_LSMASK_20070101T000000_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ECMWF__20090408T005820_20090408T020050_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DFFFRA_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DFFXYZ_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DFFLAI_20090509T000000_20090608T000000_302_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DFFLMX_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DGGXYZ_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGGTLV_20121129T010000_20121130T030000_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGGTFO_20121129T010000_20121130T030000_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGGROU_20121129T010000_20121130T030000_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGGRFI_20121129T010000_20121130T030000_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_DGGFLO_20121129T010000_20121130T030000_301_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_WEF____20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_MN_WEF_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_SOIL_P_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_GAL_SM_20050101T000000_20500101T000000_001_001_9.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_LANDCL_20050101T000000_20500101T000000_001_001_9.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_CNFSMD_20050101T000000_20500101T000000_001_001_9.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_CNFSMF_20050101T000000_20500101T000000_001_001_9.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_FLTSEA_20050101T000000_20500101T000000_001_010_8.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_RGHNS1_20050101T000000_20500101T000000_001_011_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_RGHNS2_20050101T000000_20500101T000000_001_010_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_RGHNS3_20050101T000000_20500101T000000_001_010_8.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_GAL_OS_20050101T000000_20500101T000000_001_004_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_GAL2OS_20050101T000000_20500101T000000_001_010_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_FOAM___20050101T000000_20500101T000000_001_010_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ATMOS__20050101T000000_20500101T000000_001_010_8.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_DISTAN_20050101T000000_20500101T000000_001_010_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_SSS____20050101T000000_20500101T000000_001_010_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_CNFOSD_20050101T000000_20500101T000000_001_010_8.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_CNFOSF_20050101T000000_20500101T000000_001_010_8.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_AGDPT__20050101T000000_20500101T000000_001_003_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_ECOLAI_20050101T000000_20500101T000000_001_003_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_BNDLST_20050101T000000_20500101T000000_001_003_8.zip")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_MISP___20050101T000000_20500101T000000_300_001_5.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_APDL___20050101T000000_20500101T000000_300_001_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_TEST_AUX_APDS___20050101T000000_20500101T000000_300_001_5.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ORBRES_20091105T000000_20091106T000000_280_009_1.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_CNFFAR_20050101T000000_20500101T000000_100_002_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT1D__20050101T000000_20500101T000000_001_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT1F__20050101T000000_20500101T000000_001_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT2D__20050101T000000_20500101T000000_001_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT3F__20050101T000000_20500101T000000_001_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT2F__20050101T000000_20500101T000000_001_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_OTT3D__20050101T000000_20500101T000000_001_004_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_BULL_B_20101202T000000_20500101T000000_100_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_VTEC_R_20091117T230000_20091119T010000_306_001_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_PLM____20050101T000000_20500101T000000_300_006_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_BFP____20050101T000000_20500101T000000_300_001_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_BSCAT__20050101T000000_20500101T000000_300_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_BWGHT__20050101T000000_20500101T000000_300_003_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_FAIL___20050101T000000_20500101T000000_300_001_4.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_LCF____20050101T000000_20500101T000000_300_005_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_MOONT__20050101T000000_20500101T000000_300_001_4.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_NIR____20050101T000000_20500101T000000_300_002_4.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_PMS____20050101T000000_20500101T000000_300_005_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_RFI____20050101T000000_20500101T000000_300_002_3.zip")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_SPAR___20050101T000000_20500101T000000_320_001_3.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_ORBRES_20091119T000000_20091120T000000_280_023_1.EEF")); assertTrue(SmosUtils.isAuxFileType("SM_OPER_AUX_CNFL0P_20050101T000000_20500101T000000_001_002_3.EEF")); assertFalse(SmosUtils.isAuxFileType("SM_OPER_MIR_BWLD1C_20121118T002733_20121118T012104_116_001_1.zip")); assertFalse(SmosUtils.isAuxFileType("SM_TEST_MIR_GMATD__20121117T020130_20781231T235959_115_001_3.tgz")); }