@Test public final void testRemoveIndex() { try { File[] files = new File(archivePath).listFiles(testInstance.new ARCFilter()); for(int i = 0; i < files.length; i++) { WaybackIndexer.MonitoredFile mf = testInstance.new MonitoredFile(files[i]); this.copyFile(files[i], new File(inputFolder.getAbsolutePath()+"/"+mf.getVersionedName())); } files = inputFolder.listFiles(); assertEquals(2, files.length); Long hrOid = testInstance.begin(); testInstance.removeIndex(hrOid); files = inputFolder.listFiles(); assertEquals(0, files.length); } catch(Exception e) { fail(e.getMessage()); } }
@Override public void removeIndex(Long harvestResultOid) { log.info("Removing indexes for " + getResult().getTargetInstanceOid() + " HarvestNumber " + getResult().getHarvestNumber()); if(indexFiles.size() <= 0) { log.error("Could not find any archive files in directory: " + directory.getAbsolutePath() ); } else { for(MonitoredFile f: indexFiles) { f.removeFromInput(); } } }
WaybackIndexer extends IndexerBase { @Override public void removeIndex(Long harvestResultOid) { log.info("Removing indexes for " + getResult().getTargetInstanceOid() + " HarvestNumber " + getResult().getHarvestNumber()); if(indexFiles.size() <= 0) { log.error("Could not find any archive files in directory: " + directory.getAbsolutePath() ); } else { for(MonitoredFile f: indexFiles) { f.removeFromInput(); } } } }
WaybackIndexer extends IndexerBase { @Override public void removeIndex(Long harvestResultOid) { log.info("Removing indexes for " + getResult().getTargetInstanceOid() + " HarvestNumber " + getResult().getHarvestNumber()); if(indexFiles.size() <= 0) { log.error("Could not find any archive files in directory: " + directory.getAbsolutePath() ); } else { for(MonitoredFile f: indexFiles) { f.removeFromInput(); } } } WaybackIndexer(); protected  WaybackIndexer(WaybackIndexer original); }
WaybackIndexer extends IndexerBase { @Override public void removeIndex(Long harvestResultOid) { log.info("Removing indexes for " + getResult().getTargetInstanceOid() + " HarvestNumber " + getResult().getHarvestNumber()); if(indexFiles.size() <= 0) { log.error("Could not find any archive files in directory: " + directory.getAbsolutePath() ); } else { for(MonitoredFile f: indexFiles) { f.removeFromInput(); } } } WaybackIndexer(); protected  WaybackIndexer(WaybackIndexer original); @Override RunnableIndex getCopy(); @Override Long begin(); @Override String getName(); @Override void indexFiles(Long harvestResultOid); @Override void removeIndex(Long harvestResultOid); @Override void initialise(ArcHarvestResultDTO result, File directory); void setWaybackInputFolder(String waybackInputFolder); String getWaybackInputFolder(); void setWaybackMergedFolder(String waybackMergedFolder); String getWaybackMergedFolder(); void setWaybackFailedFolder(String waybackFailedFolder); String getWaybackFailedFolder(); void setWaittime(long waittime); long getWaittime(); void setTimeout(long timeout); long getTimeout(); void setEnabled(boolean enabled); @Override boolean isEnabled(); }
WaybackIndexer extends IndexerBase { @Override public void removeIndex(Long harvestResultOid) { log.info("Removing indexes for " + getResult().getTargetInstanceOid() + " HarvestNumber " + getResult().getHarvestNumber()); if(indexFiles.size() <= 0) { log.error("Could not find any archive files in directory: " + directory.getAbsolutePath() ); } else { for(MonitoredFile f: indexFiles) { f.removeFromInput(); } } } WaybackIndexer(); protected  WaybackIndexer(WaybackIndexer original); @Override RunnableIndex getCopy(); @Override Long begin(); @Override String getName(); @Override void indexFiles(Long harvestResultOid); @Override void removeIndex(Long harvestResultOid); @Override void initialise(ArcHarvestResultDTO result, File directory); void setWaybackInputFolder(String waybackInputFolder); String getWaybackInputFolder(); void setWaybackMergedFolder(String waybackMergedFolder); String getWaybackMergedFolder(); void setWaybackFailedFolder(String waybackFailedFolder); String getWaybackFailedFolder(); void setWaittime(long waittime); long getWaittime(); void setTimeout(long timeout); long getTimeout(); void setEnabled(boolean enabled); @Override boolean isEnabled();  }