@Test public void getAllFullDumps() throws IOException { wrf.setWebResourceContentsFromResource( "https: "/wikidatawiki-index-old.html", this.getClass()); setLocalDump("20140210", DumpContentType.FULL, false); setLocalDump("20140123", DumpContentType.FULL, true); setLocalDump("20140106", DumpContentType.CURRENT, true); setLocalDump("20131201", DumpContentType.FULL, true); setLocalDump("nodate", DumpContentType.FULL, true); WmfDumpFileManager dumpFileManager = new WmfDumpFileManager( "wikidatawiki", dm, wrf); List<? extends MwDumpFile> dumpFiles = dumpFileManager .findAllDumps(DumpContentType.FULL); String[] dumpDates = { "20140210", "20140123", "20140106", "20131221", "20131201" }; boolean[] dumpIsLocal = { false, true, false, false, true }; assertEquals(dumpFiles.size(), dumpDates.length); for (int i = 0; i < dumpFiles.size(); i++) { assertEquals(dumpFiles.get(i).getDumpContentType(), DumpContentType.FULL); assertEquals(dumpFiles.get(i).getDateStamp(), dumpDates[i]); if (dumpIsLocal[i]) { assertTrue(dumpFiles.get(i) instanceof WmfLocalDumpFile); } else { assertTrue(dumpFiles.get(i) instanceof WmfOnlineStandardDumpFile); } } }
public List<MwDumpFile> findAllDumps(DumpContentType dumpContentType) { List<MwDumpFile> localDumps = findDumpsLocally(dumpContentType); if (this.webResourceFetcher != null) { List<MwDumpFile> onlineDumps = findDumpsOnline(dumpContentType); return mergeDumpLists(localDumps, onlineDumps); } else { return localDumps; } }
WmfDumpFileManager { public List<MwDumpFile> findAllDumps(DumpContentType dumpContentType) { List<MwDumpFile> localDumps = findDumpsLocally(dumpContentType); if (this.webResourceFetcher != null) { List<MwDumpFile> onlineDumps = findDumpsOnline(dumpContentType); return mergeDumpLists(localDumps, onlineDumps); } else { return localDumps; } } }
WmfDumpFileManager { public List<MwDumpFile> findAllDumps(DumpContentType dumpContentType) { List<MwDumpFile> localDumps = findDumpsLocally(dumpContentType); if (this.webResourceFetcher != null) { List<MwDumpFile> onlineDumps = findDumpsOnline(dumpContentType); return mergeDumpLists(localDumps, onlineDumps); } else { return localDumps; } } WmfDumpFileManager(String projectName,
			DirectoryManager downloadDirectoryManager,
			WebResourceFetcher webResourceFetcher); }
WmfDumpFileManager { public List<MwDumpFile> findAllDumps(DumpContentType dumpContentType) { List<MwDumpFile> localDumps = findDumpsLocally(dumpContentType); if (this.webResourceFetcher != null) { List<MwDumpFile> onlineDumps = findDumpsOnline(dumpContentType); return mergeDumpLists(localDumps, onlineDumps); } else { return localDumps; } } WmfDumpFileManager(String projectName,
			DirectoryManager downloadDirectoryManager,
			WebResourceFetcher webResourceFetcher); List<MwDumpFile> findAllRelevantRevisionDumps(boolean preferCurrent); MwDumpFile findMostRecentDump(DumpContentType dumpContentType); List<MwDumpFile> findAllDumps(DumpContentType dumpContentType); }
WmfDumpFileManager { public List<MwDumpFile> findAllDumps(DumpContentType dumpContentType) { List<MwDumpFile> localDumps = findDumpsLocally(dumpContentType); if (this.webResourceFetcher != null) { List<MwDumpFile> onlineDumps = findDumpsOnline(dumpContentType); return mergeDumpLists(localDumps, onlineDumps); } else { return localDumps; } } WmfDumpFileManager(String projectName,
			DirectoryManager downloadDirectoryManager,
			WebResourceFetcher webResourceFetcher); List<MwDumpFile> findAllRelevantRevisionDumps(boolean preferCurrent); MwDumpFile findMostRecentDump(DumpContentType dumpContentType); List<MwDumpFile> findAllDumps(DumpContentType dumpContentType); static final String DOWNLOAD_DIRECTORY_NAME; }