LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat4Filename(String filename) { if (filename.matches(L4_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L4_FILENAME_REGEX + getCompressionExtension())) { return true; } 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();  }
@Test public void testIsLandsat4Filename() throws Exception { assertTrue(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT40140341983030XXX13_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT40140341982315PAC00_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT41160361989137XXX02_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT41730601990155XXX01.tar.bz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT41930241992221XXX02.tar.gz")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT40140341982315PAC00_B1.TIF")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat4Filename("LT51920342011274MPS00.tgz")); }