/** * Retrieves the names of the bands for the given product type. * * @param prodType the product type string * @return the names of the bands. */ public String[] getBandNames(final String prodType) { String[] bandNames = null; try { final ModisProductDescription prod = getProductDescription(prodType); bandNames = prod.getBandNames(); } catch (IOException e) { logger.severe("Unable to retrieve the band names for product of type '" + prodType + "'."); } return bandNames; }
@Test public void testDefaultConstruction() { assertEquals(0, prod.getBandNames().length); assertNull(prod.getBandDescription("no_band")); assertEquals(false, prod.mustFlipTopDown()); assertArrayEquals(null, prod.getGeolocationDatasetNames()); assertEquals(null, prod.getExternalGeolocationPattern()); assertEquals(false, prod.hasExternalGeolocation()); assertEquals(0, prod.getTiePointNames().length); }
String[] bandNames = prod.getBandNames(); assertNotNull(bandNames); assertEquals(2, bandNames.length);