SlstrPduStitcher { static SlstrNameDecomposition decomposeSlstrName(String slstrName) throws PDUStitchingException { final SlstrNameDecomposition slstrNameDecomposition = new SlstrNameDecomposition(); try { slstrNameDecomposition.startTime = SLSTR_DATE_FORMAT_CONVERTER.parse(slstrName.substring(16, 31)); slstrNameDecomposition.stopTime = SLSTR_DATE_FORMAT_CONVERTER.parse(slstrName.substring(32, 47)); } catch (ConversionException e) { throw new PDUStitchingException(e.getMessage()); } slstrNameDecomposition.duration = slstrName.substring(64, 68); slstrNameDecomposition.cycleNumber = slstrName.substring(69, 72); slstrNameDecomposition.relativeOrbitNumber = slstrName.substring(73, 76); slstrNameDecomposition.frameAlongTrackCoordinate = slstrName.substring(77, 81); slstrNameDecomposition.fileGeneratingCentre = slstrName.substring(82, 85); slstrNameDecomposition.platform = slstrName.substring(86, 87); slstrNameDecomposition.timelinessOfProcessingWorkflow = slstrName.substring(88, 90); slstrNameDecomposition.baselineCollectionOrDataUsage = slstrName.substring(91, 94); return slstrNameDecomposition; }  static File createStitchedSlstrL1BFile(File targetDirectory, File[] slstrProductFiles, String productName,
                                                  ProgressMonitor pm);  }
@Test public void testDecomposeSlstrName() throws URISyntaxException, PDUStitchingException { final SlstrPduStitcher.SlstrNameDecomposition firstSlstrNameDecomposition = SlstrPduStitcher.decomposeSlstrName(TestUtils.getFirstSlstrFile().getParentFile().getName()); Date startTime = new GregorianCalendar(2013, Calendar.JULY, 7, 15, 32, 52).getTime(); Date stopTime = new GregorianCalendar(2013, Calendar.JULY, 7, 15, 37, 52).getTime(); assertEquals(startTime, firstSlstrNameDecomposition.startTime); assertEquals(stopTime, firstSlstrNameDecomposition.stopTime); assertEquals("0299", firstSlstrNameDecomposition.duration); assertEquals("158", firstSlstrNameDecomposition.cycleNumber); assertEquals("182", firstSlstrNameDecomposition.relativeOrbitNumber); assertEquals("____", firstSlstrNameDecomposition.frameAlongTrackCoordinate); assertEquals("SVL", firstSlstrNameDecomposition.fileGeneratingCentre); assertEquals("O", firstSlstrNameDecomposition.platform); assertEquals("NR", firstSlstrNameDecomposition.timelinessOfProcessingWorkflow); assertEquals("001", firstSlstrNameDecomposition.baselineCollectionOrDataUsage); }