BinnedProductReaderPlugin implements ProductReaderPlugIn { public DecodeQualification getDecodeQualification(Object input) { if (input == null) { return DecodeQualification.UNABLE; } final String path = input.toString(); if (BinnedProductReaderPlugin.FILE_EXTENSION.equalsIgnoreCase(FileUtils.getExtension(path))) { try { NetcdfFile netcdfFile = null; try { netcdfFile = NetcdfFileOpener.open(path); if (netcdfFile == null) { return DecodeQualification.UNABLE; } for (Variable variable : netcdfFile.getVariables()) { Attribute gridMappingName = variable.findAttribute("grid_mapping_name"); if (gridMappingName != null) { if ("1D binned sinusoidal".equalsIgnoreCase(gridMappingName.getStringValue())) { return DecodeQualification.INTENDED; } } Attribute gridMapping = variable.findAttribute("grid_mapping"); if (gridMapping != null) { if ("sinusoidal".equalsIgnoreCase(gridMapping.getStringValue())) { return DecodeQualification.INTENDED; } } } if (netcdfFile.findDimension("bin_index") != null && (netcdfFile.findDimension("sin_grid") != null || netcdfFile.findDimension("bin_list") != null)) { return DecodeQualification.INTENDED; } } finally { if (netcdfFile != null) { netcdfFile.close(); } } } catch (IOException e) { return DecodeQualification.UNABLE; } } return DecodeQualification.UNABLE; }  DecodeQualification getDecodeQualification(Object input); Class[] getInputTypes(); ProductReader createReaderInstance(); BeamFileFilter getProductFileFilter(); String[] getFormatNames(); String[] getDefaultFileExtensions(); String getDescription(Locale locale);  }
@Test public void testGetDecodeQualification() { assertEquals(DecodeQualification.UNABLE, plugin.getDecodeQualification(null)); assertEquals(DecodeQualification.UNABLE, plugin.getDecodeQualification("MER_FR__1PNUPA20070708_164713_000000982059_00384_27993_4986.N1")); }