@Test public void testCollectFiles() throws IOException, URISyntaxException { List<String> ncFiles = new ArrayList<>(); final File[] slstrFiles = TestUtils.getSlstrFiles(); for (File slstrFile : slstrFiles) { SlstrPduStitcher.collectFiles(ncFiles, createXmlDocument(new FileInputStream(slstrFile))); } assertEquals(3, ncFiles.size()); assertEquals("met_tx.nc", ncFiles.get(0)); assertEquals("viscal.nc", ncFiles.get(1)); assertEquals("F1_BT_io.nc", ncFiles.get(2)); }
static void collectFiles(List<String> ncFileNames, Document manifestDocument) { final NodeList fileLocationNodes = manifestDocument.getElementsByTagName("fileLocation"); for (int i = 0; i < fileLocationNodes.getLength(); i++) { final String ncFileName = fileLocationNodes.item(i).getAttributes().getNamedItem("href").getNodeValue(); if (!ncFileNames.contains(ncFileName)) { ncFileNames.add(ncFileName); } } }
SlstrPduStitcher { static void collectFiles(List<String> ncFileNames, Document manifestDocument) { final NodeList fileLocationNodes = manifestDocument.getElementsByTagName("fileLocation"); for (int i = 0; i < fileLocationNodes.getLength(); i++) { final String ncFileName = fileLocationNodes.item(i).getAttributes().getNamedItem("href").getNodeValue(); if (!ncFileNames.contains(ncFileName)) { ncFileNames.add(ncFileName); } } } }
SlstrPduStitcher { static void collectFiles(List<String> ncFileNames, Document manifestDocument) { final NodeList fileLocationNodes = manifestDocument.getElementsByTagName("fileLocation"); for (int i = 0; i < fileLocationNodes.getLength(); i++) { final String ncFileName = fileLocationNodes.item(i).getAttributes().getNamedItem("href").getNodeValue(); if (!ncFileNames.contains(ncFileName)) { ncFileNames.add(ncFileName); } } }  }
SlstrPduStitcher { static void collectFiles(List<String> ncFileNames, Document manifestDocument) { final NodeList fileLocationNodes = manifestDocument.getElementsByTagName("fileLocation"); for (int i = 0; i < fileLocationNodes.getLength(); i++) { final String ncFileName = fileLocationNodes.item(i).getAttributes().getNamedItem("href").getNodeValue(); if (!ncFileNames.contains(ncFileName)) { ncFileNames.add(ncFileName); } } }  static File createStitchedSlstrL1BFile(File targetDirectory, File[] slstrProductFiles, String productName,
                                                  ProgressMonitor pm); }
SlstrPduStitcher { static void collectFiles(List<String> ncFileNames, Document manifestDocument) { final NodeList fileLocationNodes = manifestDocument.getElementsByTagName("fileLocation"); for (int i = 0; i < fileLocationNodes.getLength(); i++) { final String ncFileName = fileLocationNodes.item(i).getAttributes().getNamedItem("href").getNodeValue(); if (!ncFileNames.contains(ncFileName)) { ncFileNames.add(ncFileName); } } }  static File createStitchedSlstrL1BFile(File targetDirectory, File[] slstrProductFiles, String productName,
                                                  ProgressMonitor pm);  }