@Test public void getBand_Compact() { String name_pvi="T36JTT_20160914T074612_PVI.jp2"; String name="T36JTT_20160914T074612_B01.jp2"; Assert.assertEquals(mgr.getBandIdFromName(name), "B01"); Assert.assertEquals(mgr.getBandIdFromName(name_pvi), "no_band"); }
String getBandIdFromName (String name) { String band_id = "no_band"; String b = null; if (!name.matches("S2._.*")) b = name.substring(23, 26); else b = name.substring(56, 59); if (b.matches("B\\d\\d")) band_id = b; return band_id; }
DrbImageManager { String getBandIdFromName (String name) { String band_id = "no_band"; String b = null; if (!name.matches("S2._.*")) b = name.substring(23, 26); else b = name.substring(56, 59); if (b.matches("B\\d\\d")) band_id = b; return band_id; } }
DrbImageManager { String getBandIdFromName (String name) { String band_id = "no_band"; String b = null; if (!name.matches("S2._.*")) b = name.substring(23, 26); else b = name.substring(56, 59); if (b.matches("B\\d\\d")) band_id = b; return band_id; } DrbImageManager(); }
DrbImageManager { String getBandIdFromName (String name) { String band_id = "no_band"; String b = null; if (!name.matches("S2._.*")) b = name.substring(23, 26); else b = name.substring(56, 59); if (b.matches("B\\d\\d")) band_id = b; return band_id; } DrbImageManager(); void add(DrbImage image); void addAll(Collection<DrbImage> images); Bands[][] getMosaic(); }
DrbImageManager { String getBandIdFromName (String name) { String band_id = "no_band"; String b = null; if (!name.matches("S2._.*")) b = name.substring(23, 26); else b = name.substring(56, 59); if (b.matches("B\\d\\d")) band_id = b; return band_id; } DrbImageManager(); void add(DrbImage image); void addAll(Collection<DrbImage> images); Bands[][] getMosaic();  }