private static File getResidualsFile(final Product sourceProduct) { final String fileName = sourceProduct.getName() + "_residual.txt"; return new File(ResourceUtils.getReportFolder(), fileName); }
private InputStream getERSAuxFile(final String fileName) throws IOException { final String path = "org/esa/s1tbx/auxdata/ers/"+ fileName; return ResourceUtils.getResourceAsStream(path, this.getClass()); }
public static File getInternalGraphFolder() { return ResourceUtils.getGraphFolder("internal").toFile(); }
@Override public void run() { ResourceUtils.installGraphs(this.getClass(), "org/esa/snap/classification/graphs/"); } }
File mainHeaderFile = null; ResourceUtils.sortFileList(fileList);
private static File getResidualsFile(final Product sourceProduct) { final String fileName = sourceProduct.getName() + "_residual.txt"; return new File(ResourceUtils.getReportFolder(), fileName); } }
private static InputStream getResStream(final String resourcePath, final String mission, final String fileName, final Class resourceClass) throws IOException { final String path = resourcePath + mission.toLowerCase() + "/" + fileName; return ResourceUtils.getResourceAsStream(path, resourceClass); } }
public static File getStandardGraphFolder() { return ResourceUtils.getGraphFolder("Standard Graphs").toFile(); }
/** * Set absolute path for outputing target report file. */ private void setTargetReportFilePath() { final String fileName = sourceProduct.getName() + "_wind_field_report.xml"; windFieldReportFile = new File(ResourceUtils.getReportFolder(), fileName); }
private InputStream getResFile(String fileName) throws IOException { final Path moduleBasePath = ResourceInstaller.findModuleCodeBasePath(this.getClass()); final Path kernelPath = moduleBasePath.resolve("org/esa/s1tbx/utilities/kernels/" + fileName); return ResourceUtils.getResourceAsStream(kernelPath.toString(), this.getClass()); }
private JPopupMenu createGraphPopup() { final Path graphPath = ResourceUtils.getGraphFolder(""); final JPopupMenu popup = new JPopupMenu(); if (Files.exists(graphPath)) { createGraphMenu(popup, graphPath.toFile()); } return popup; }
/** * Set absolute path for outputing target report file. */ private void setTargetReportFilePath() { final String fileName = sourceProduct.getName() + "_object_detection_report.xml"; targetReportFile = new File(ResourceUtils.getReportFolder(), fileName); }
/** * Creates the default menu. * * @return The menu */ public JMenuBar createDefaultMenu() { JMenu fileMenu = new JMenu("File"); fileMenu.add(loadAction); fileMenu.add(saveAction); fileMenu.addSeparator(); fileMenu.add(viewGraphXMLAction); JMenu graphMenu = new JMenu("Graphs"); createGraphMenu(graphMenu, ResourceUtils.getGraphFolder("").toFile()); final JMenuBar menuBar = new JMenuBar(); menuBar.add(fileMenu); menuBar.add(graphMenu); return menuBar; }
private void writeStatsToFile() { String fileName = sourceProduct.getName() + "_statistics.txt"; try { fileName = ResourceUtils.getReportFolder().toString() + File.separator + fileName; final FileOutputStream out = new FileOutputStream(fileName);
public GraphBuilderDialog(final AppContext theAppContext, final String title, final String helpID, final boolean allowGraphBuilding) { super(theAppContext.getApplicationWindow(), title, 0, helpID); this.allowGraphBuilding = allowGraphBuilding; appContext = theAppContext; graphEx = new GraphExecuter(); graphEx.addObserver(this); String lastDir = SnapApp.getDefault().getPreferences().get(LAST_GRAPH_PATH, ResourceUtils.getGraphFolder("").toFile().getAbsolutePath()); if (new File(lastDir).exists()) { SnapApp.getDefault().getPreferences().put(LAST_GRAPH_PATH, lastDir); } initUI(); }
private void createReportFile() { final File reportFile = new File(ResourceUtils.getReportFolder(), sourceProduct.getName() + "_pca_report.txt"); try { final FileOutputStream out = new FileOutputStream(reportFile);