Revision: 2316 http://archive-access.svn.sourceforge.net/archive-access/?rev=2316&view=rev Author: bradtofel Date: 2008-06-24 17:16:59 -0700 (Tue, 24 Jun 2008) Log Message: ----------- REFACTOR: all update functionality was moved out into LocalResourceIndexUpdater class, so there are no longer dependencies from this class to the updater. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java 2008-06-25 00:15:28 UTC (rev 2315) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java 2008-06-25 00:16:59 UTC (rev 2316) @@ -39,7 +39,6 @@ import org.archive.wayback.resourceindex.UpdatableSearchResultSource; import org.archive.wayback.resourceindex.cdx.CDXLineToSearchResultAdapter; import org.archive.wayback.resourceindex.cdx.SearchResultToCDXLineAdapter; -import org.archive.wayback.resourceindex.updater.BDBIndexUpdater; import org.archive.wayback.util.AdaptedIterator; import org.archive.wayback.util.Adapter; import org.archive.wayback.util.CloseableIterator; @@ -59,17 +58,12 @@ private String bdbPath = null; private String bdbName = null; - private BDBIndexUpdater updater = null; /** * @throws DatabaseException * @throws ConfigurationException */ public void init() throws DatabaseException, ConfigurationException { initializeDB(bdbPath,bdbName); - if(updater != null) { - updater.setIndex(this); - updater.startup(); - } } private CloseableIterator<SearchResult> adaptIterator( @@ -224,14 +218,6 @@ Iterator<SearchResult> itrSR = new AdaptedIterator<String,SearchResult>(itrS,adapterStoSR); -// Adapter<SearchResult,BDBRecord> adapterSRtoBDB = -// new SearchResultToBDBRecordAdapter(); -// -// Iterator<BDBRecord> itrBDB = -// new AdaptedIterator<SearchResult,BDBRecord>(itrSR, -// adapterSRtoBDB); -// -// index.insertRecords(itrBDB); try { index.addSearchResults(itrSR, canonicalizer); } catch (IOException e) { @@ -242,24 +228,28 @@ USAGE(); } } + /** * @return the bdbPath */ public String getBdbPath() { return bdbPath; } + /** * @param bdbPath the bdbPath to set */ public void setBdbPath(String bdbPath) { this.bdbPath = bdbPath; } + /** * @return the bdbName */ public String getBdbName() { return bdbName; } + /** * @param bdbName the bdbName to set */ @@ -267,20 +257,6 @@ this.bdbName = bdbName; } - /** - * @return the updater - */ - public BDBIndexUpdater getUpdater() { - return updater; - } - - /** - * @param updater the updater to set - */ - public void setUpdater(BDBIndexUpdater updater) { - this.updater = updater; - } - public void shutdown() throws IOException { try { shutdownDB(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |