01: // indexRI.java
02: // -----------------------------
03: // (C) 2005 by Michael Peter Christen; mc@anomic.de, Frankfurt a. M., Germany
04: // first published 6.5.2005 on http://www.anomic.de
05: //
06: // This is a part of YaCy, a peer-to-peer based web search engine
07: //
08: // $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $
09: // $LastChangedRevision: 1986 $
10: // $LastChangedBy: orbiter $
11: //
12: // LICENSE
13: //
14: // This program is free software; you can redistribute it and/or modify
15: // it under the terms of the GNU General Public License as published by
16: // the Free Software Foundation; either version 2 of the License, or
17: // (at your option) any later version.
18: //
19: // This program is distributed in the hope that it will be useful,
20: // but WITHOUT ANY WARRANTY; without even the implied warranty of
21: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22: // GNU General Public License for more details.
23: //
24: // You should have received a copy of the GNU General Public License
25: // along with this program; if not, write to the Free Software
26: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27:
28: package de.anomic.index;
29:
30: import java.util.Set;
31:
32: import de.anomic.kelondro.kelondroCloneableIterator;
33:
34: public interface indexRI {
35:
36: public int size();
37:
38: public int minMem();
39:
40: public kelondroCloneableIterator<indexContainer> wordContainers(
41: String startWordHash, boolean rot); // method to replace wordHashes
42:
43: public long getUpdateTime(String wordHash);
44:
45: public int indexSize(String wordHash);
46:
47: public boolean hasContainer(String wordHash); // should only be used if in case that true is returned the getContainer is NOT called
48:
49: public indexContainer getContainer(String wordHash,
50: Set<String> urlselection); // if urlselection != null all url references which are not in urlselection are removed from the container
51:
52: public indexContainer deleteContainer(String wordHash);
53:
54: public boolean removeEntry(String wordHash, String urlHash);
55:
56: public int removeEntries(String wordHash, Set<String> urlHashes);
57:
58: public void addEntries(indexContainer newEntries);
59:
60: public void close();
61:
62: }
|