IgbpGlccProductReaderPlugIn implements ProductReaderPlugIn { @Override public DecodeQualification getDecodeQualification(Object input) { if (input != null) { File inputFile = new File( input.toString() ); final String inputFileName = inputFile.getName().toLowerCase(); if( inputFileName.matches("g(.*)2_0ll\\.img") ) { return DecodeQualification.INTENDED; } } return DecodeQualification.UNABLE; }  @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 testGetDecodeQualification() throws Exception { assertEquals(DecodeQualification.UNABLE, plugin.getDecodeQualification( "horst" ) ); assertEquals(DecodeQualification.UNABLE, plugin.getDecodeQualification( "gbats1_2.img" ) ); assertEquals(DecodeQualification.INTENDED, plugin.getDecodeQualification( "gbats2_0ll.img" ) ); assertEquals(DecodeQualification.INTENDED, plugin.getDecodeQualification( "gigbp2_0ll.img" ) ); }