01: /*******************************************************************************
02: * Copyright (c) 2003 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.core.indexsearch;
11:
12: import java.io.IOException;
13: import java.util.*;
14: import java.util.ArrayList;
15:
16: import org.eclipse.core.resources.IFile;
17: import org.eclipse.core.runtime.IProgressMonitor;
18:
19: /**
20: * An IndeyQuery is used to perform a query against the indexing framework.
21: */
22: public interface IIndexQuery {
23:
24: /**
25: * Compute the list of paths which are keying index files and add them to the given list.
26: */
27: void computePathsKeyingIndexFiles(ArrayList requiredIndexKeys);
28:
29: /**
30: * Perform the query on the given index and adds the paths of all found documents to the given collector.
31: */
32: void findIndexMatches(IIndex index, HashSet collector,
33: IProgressMonitor progressMonitor) throws IOException;
34:
35: /**
36: * Locate all matches of this query in the given file candidate and return them via the resultcollector.
37: */
38: void locateMatches(IFile candidate,
39: ISearchResultCollector resultCollector);
40: }
|