@Test public void testIsLandsat8Filename() throws Exception { assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LT82270322013068LGN01_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LT82270322013068LGN01_MTL.TXT")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LC82160332013191LGN00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LO82160332013191LGN00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LT82160332013191LGN00.tar.gz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LT82160332013191LGN00.tgz")); assertTrue(LandsatGeotiffReaderPlugin.isLandsat8Filename("LC81970232013266LGN00.tar.bz")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat8Filename("L8196030_03020031023_MTL.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsat8Filename("LT52160332013191LGN00.tar.gz")); }
static boolean isLandsat8Filename(String filename) { if (filename.matches(L8_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L8_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat8Filename(String filename) { if (filename.matches(L8_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L8_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } } }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat8Filename(String filename) { if (filename.matches(L8_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L8_FILENAME_REGEX + getCompressionExtension())) { return true; } else { return false; } }  }
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsat8Filename(String filename) { if (filename.matches(L8_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L8_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 isLandsat8Filename(String filename) { if (filename.matches(L8_FILENAME_REGEX + "_MTL" + getTxtExtension())) { return true; } else if (filename.matches(L8_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();  }