public void startDocument(Key key) throws DBException; public void endDocument(Key key) throws DBException;
So that existing Indexers don't have to implement this methods I've actually done this:
public interface ExtendedIndexer extends Indexer { public void startDocument(Key key) throws DBException; public void endDocument(Key key) throws DBException; }
and made IndexManager test for an Indexer being an instance of ExtendedIndexer in which case it invokes these methods at the appropriate times. The alternative would be just to add these to the Indexer interface and require all existing Indexers to implement the two extra methods.
ExtendedIndexer
+ doesn't affect existing Indexers - needlessly complicates things
Add methods to Indexer
+ simple - breaks existing Indexers
I guess it comes down to whether there /are/ any extant Indexers outside of the Xindice source. I guess perhaps not?
-- Andy Armstrong, Tagish