Sentinel2Utils { public static String getAbsoluteOrbitFromDatatakeFilename( final String datatakeFileName) { final int START_ABSOLUTE_ORBIT_INDEX = 21; final int END_ABSOLUTE_ORBIT_INDEX = 27; String absoluteOrbitNumber = ""; logger.debug("(getAbsoluteOrbitFromDatatakeFilename)(datatakeFileName:" + datatakeFileName + ")|start"); if ((datatakeFileName != null) && !datatakeFileName.equals("")) { try { absoluteOrbitNumber = datatakeFileName.substring(START_ABSOLUTE_ORBIT_INDEX, END_ABSOLUTE_ORBIT_INDEX); } catch (final Exception ex) { logger.warn("Sentinel-2 ingestion: Datatake file name is empty; " + "error message: " + ex.getMessage()); } } final String result = Sentinel2Utils.filterUselessZeros(absoluteOrbitNumber); logger.debug("(getAbsoluteOrbitFromDatatakeFilename) return:" + result + "|end"); return result; } private  Sentinel2Utils(); static String xYZpoints2GML(final String pointsString); static String xYZpoints2JTS(final String pointsString); static String xYPoints2GML(final String pointsString); static String xYPoints2JTS(final String pointsString); static String getEndPositionByStart(final String startTime); static String getSatelliteByProductName(final String productName); static String filterUselessZeros(final String integer); static String getAbsoluteOrbitFromDatatakeFilename(
         final String datatakeFileName); static String getFormattedTimeString(final String rawTimeString); static String formatNumber(double value); static final String DATE_TIME_FORMAT; static final long SENSING_TIME; }
@Test public void testGetAbsoluteOrbitFromDatatakeFilename() throws Exception { final String dataTakeFilename = "GS2A_20091211T165928_000065_N01.01"; final String expected = "65"; final String absoluteOrbit = Sentinel2Utils.getAbsoluteOrbitFromDatatakeFilename(dataTakeFilename); Assert.assertEquals(expected, absoluteOrbit); }