@Test public void testIsLandsat5Filename() throws Exception { assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51231232013068GSI01_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51231232013068GSI01_MTL.TXT")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51920342011274MPS00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51920342011274MPS00.tgz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51700572011312MLK00.tar.bz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51940252011320KIS00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51970241984299FUI00.ZIP")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT51231232013068GSI01_B3.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat5Filename("L5196030_03020031023_MTL.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat5Filename("LT71920342011274MPS00.tar.gz")); }
static boolean isLandsat5Filename(String filename) { if (filename.matches(L5_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L5_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat5Filename(String filename) { if (filename.matches(L5_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L5_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat5Filename(String filename) { if (filename.matches(L5_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L5_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }  }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat5Filename(String filename) { if (filename.matches(L5_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L5_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }  @Override DecodeQualification getDecodeQualification(Object input); @Override Class[] getInputTypes(); @Override ProductReader createReaderInstance(); @Override String[] getFormatNames(); @Override String[] getDefaultFileExtensions(); @Override String getDescription(Locale locale); @Override BeamFileFilter getProductFileFilter(); }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat5Filename(String filename) { if (filename.matches(L5_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L5_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }  @Override DecodeQualification getDecodeQualification(Object input); @Override Class[] getInputTypes(); @Override ProductReader createReaderInstance(); @Override String[] getFormatNames(); @Override String[] getDefaultFileExtensions(); @Override String getDescription(Locale locale); @Override BeamFileFilter getProductFileFilter();  }