ProcessorAdapter { protected static void shallowCopyPatches(String wd) throws IOException { java.nio.file.Path dir = Paths.get(wd); try (DirectoryStream<java.nio.file.Path> directoryStream = Files.newDirectoryStream(dir, new DirectoryStream.Filter<java.nio.file.Path>() { @Override public boolean accept(java.nio.file.Path entry) throws IOException { return entry.getFileName().toString().endsWith("-patch") && Files.isSymbolicLink(entry); } })) { for (java.nio.file.Path srcChild : directoryStream) { String srcName = srcChild.getFileName().toString(); String destName = srcName.substring(0, srcName.length() - "-patch".length()); java.nio.file.Path destChild = dir.resolve(destName); try { Files.createDirectory(destChild); } catch (FileAlreadyExistsException ignore) {} shallowCopyRecursive(srcChild, destChild); } } } ProcessorAdapter(MapContext mapContext); void prepareProcessing(); boolean canSkipInputProduct(); abstract boolean processSourceProduct(MODE mode, ProgressMonitor pm); abstract Product openProcessedProduct(); abstract void saveProcessedProducts(ProgressMonitor pm); abstract Path getOutputProductPath(); abstract boolean supportsPullProcessing(); Product getProcessedProduct(ProgressMonitor pm); void setProcessingRectangle(Rectangle roiRectangle); Path getInputPath(); String[] getInputParameters(); Rectangle getInputRectangle(); AffineTransform getInput2OutputTransform(); void setInput2OutputTransform(AffineTransform input2OutputTransform); Product getInputProduct(); void setInputFile(File inputFile); File getInputFile(); void dispose(); void closeInputProduct(); static boolean hasInvalidStartAndStopTime(Product product); static void copySceneRasterStartAndStopTime(Product sourceProduct, Product targetProduct,
                                                       Rectangle inputRectangle); static final String[] EMPTY_PARAMETERS; }
@Ignore @Test public void testShallowCopyPatches() throws Exception { ProcessorAdapter.shallowCopyPatches("/home/boe/tmp/caltest"); }