@Test public void testIsLandsat7Filename() throws Exception { assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71890342011277ASN00_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71890342011277ASN00_MTL.TXT")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71890342011277ASN00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71890342011277ASN00.tgz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71710602000329EDC00.tar.bz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71920252000332NSG00.ZIP")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71940272000330EDC00.tar.gz")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE71890342011277ASN00_B3.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat7Filename("L71890342011277ASN00.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat7Filename("LE81890342011277ASN00_MTL.txt")); }
static boolean isLandsat7Filename(String filename) { if (filename.matches(L7_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L7_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat7Filename(String filename) { if (filename.matches(L7_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L7_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat7Filename(String filename) { if (filename.matches(L7_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L7_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }  }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat7Filename(String filename) { if (filename.matches(L7_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L7_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 isLandsat7Filename(String filename) { if (filename.matches(L7_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L7_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();  }