SmosUtils { public static boolean isMirasPlanType(String fileName) { return fileName.matches("SM_.{4}_MPL_ORBSCT_.{44,45}") || fileName.matches("SM_.{4}_MPL_XBDOWN_.{44,45}") || fileName.matches("SM_.{4}_MPL_APIDPL_.{44,45}") || fileName.matches("SM_.{4}_MPL_HLPLAN_.{44,45}") || fileName.matches("SM_.{4}_MPL_XBDPRE_.{44,45}") || fileName.matches("SM_.{4}_MPL_PROTEV_.{44,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 testIsMirasPlanType() { assertTrue(SmosUtils.isMirasPlanType("SM_TEST_MPL_ORBSCT_20070223T060002_20781231T235959_00000001.EEF")); assertTrue(SmosUtils.isMirasPlanType("SM_OPER_MPL_PROTEV_20091120T101808_20091221T101153_280_023_1.EEF")); assertTrue(SmosUtils.isMirasPlanType("SM_OPER_MPL_XBDOWN_20091123T000000_20091124T000000_331_001_1.EEF")); assertTrue(SmosUtils.isMirasPlanType("SM_OPER_MPL_APIDPL_20091120T000000_20091123T000000_331_001_1.EEF")); assertTrue(SmosUtils.isMirasPlanType("SM_OPER_MPL_HLPLAN_20091120T000000_20091123T000000_331_001_1.EEF")); assertTrue(SmosUtils.isMirasPlanType("SM_OPER_MPL_XBDPRE_20091123T000000_20091130T000000_110_001_7.EEF")); assertFalse(SmosUtils.isMirasPlanType("SM_OPER_MIR_BWLD1C_20121118T002733_20121118T012104_116_001_1.zip")); assertFalse(SmosUtils.isMirasPlanType("SM_TEST_AUX_IGRF___20080102T010000_20080102T025959_105_001_0.zip")); assertFalse(SmosUtils.isMirasPlanType("TheNewSensoir.txt")); }