@Test public void testIsLandsat() throws Exception { assertTrue(LandsatTypeInfo.isLandsat("LE07_L1TP_016039_20040918_20160211_01_T1_MTL.txt")); assertTrue(LandsatTypeInfo.isLandsat("LM11870291976166ESA00_MTL.txt")); assertTrue(LandsatTypeInfo.isLandsat("LT40140341983030XXX13_MTL.txt")); assertTrue(LandsatTypeInfo.isLandsat("LT41730601990155XXX01.tar.bz")); assertTrue(LandsatTypeInfo.isLandsat("LT51231232013068GSI01_MTL.txt")); assertTrue(LandsatTypeInfo.isLandsat("LT51940252011320KIS00.tar.gz")); assertTrue(LandsatTypeInfo.isLandsat("LE71890342011277ASN00_MTL.TXT")); assertTrue(LandsatTypeInfo.isLandsat("LE71890342011277ASN00.tar.gz")); assertTrue(LandsatTypeInfo.isLandsat("LO82160332013191LGN00.tar.gz")); assertTrue(LandsatTypeInfo.isLandsat("LT82270322013068LGN01_MTL.TXT")); }
public static boolean isLandsat(String fileName) { for (LandsatType type : LandsatType.values()) { if (type.matchesFileNamepattern(fileName)) { return true; } } return false; }
LandsatTypeInfo { public static boolean isLandsat(String fileName) { for (LandsatType type : LandsatType.values()) { if (type.matchesFileNamepattern(fileName)) { return true; } } return false; } }
LandsatTypeInfo { public static boolean isLandsat(String fileName) { for (LandsatType type : LandsatType.values()) { if (type.matchesFileNamepattern(fileName)) { return true; } } return false; } private  LandsatTypeInfo(); }
LandsatTypeInfo { public static boolean isLandsat(String fileName) { for (LandsatType type : LandsatType.values()) { if (type.matchesFileNamepattern(fileName)) { return true; } } return false; } private  LandsatTypeInfo(); static boolean isLandsat(String fileName); static boolean isLandsatL2(String fileName); static boolean isLandsatLevel2(String fileName); }
LandsatTypeInfo { public static boolean isLandsat(String fileName) { for (LandsatType type : LandsatType.values()) { if (type.matchesFileNamepattern(fileName)) { return true; } } return false; } private  LandsatTypeInfo(); static boolean isLandsat(String fileName); static boolean isLandsatL2(String fileName); static boolean isLandsatLevel2(String fileName);  }