KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > search > SearchQuery


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.help.internal.search;
12
13 import java.util.ArrayList JavaDoc;
14 import java.util.Collection JavaDoc;
15
16 import org.eclipse.core.runtime.*;
17
18 /**
19  * An implementation of ISearchQuery.
20  */

21 public class SearchQuery implements ISearchQuery {
22     Collection JavaDoc fieldNames;
23     boolean fieldSearch;
24     String JavaDoc locale;
25     String JavaDoc searchWord;
26     public SearchQuery() {
27         this("", false, new ArrayList JavaDoc(), Platform.getNL()); //$NON-NLS-1$
28
}
29     public SearchQuery(String JavaDoc searchWord, boolean fieldSearch,
30             Collection JavaDoc fieldNames, String JavaDoc locale) {
31         this.searchWord = searchWord;
32         this.fieldSearch = fieldSearch;
33         this.fieldNames = fieldNames;
34         this.locale = locale;
35     }
36     /**
37      * Returns the fieldNames.
38      *
39      * @return Collection
40      */

41     public Collection JavaDoc getFieldNames() {
42         return fieldNames;
43     }
44
45     /**
46      * Returns the fieldSearch.
47      *
48      * @return boolean
49      */

50     public boolean isFieldSearch() {
51         return fieldSearch;
52     }
53
54     /**
55      * Returns the locale.
56      *
57      * @return String
58      */

59     public String JavaDoc getLocale() {
60         return locale;
61     }
62
63     /**
64      * Returns the searchWord.
65      *
66      * @return String
67      */

68     public String JavaDoc getSearchWord() {
69         return searchWord;
70     }
71
72     /**
73      * Sets the fieldNames.
74      *
75      * @param fieldNames
76      * The fieldNames to set
77      */

78     public void setFieldNames(Collection JavaDoc fieldNames) {
79         this.fieldNames = fieldNames;
80     }
81
82     /**
83      * Sets the fieldSearch.
84      *
85      * @param fieldSearch
86      * The fieldSearch to set
87      */

88     public void setFieldSearch(boolean fieldSearch) {
89         this.fieldSearch = fieldSearch;
90     }
91
92     /**
93      * Sets the locale.
94      *
95      * @param locale
96      * The locale to set
97      */

98     public void setLocale(String JavaDoc locale) {
99         this.locale = locale;
100     }
101
102     /**
103      * Sets the searchWord.
104      *
105      * @param searchWord
106      * The searchWord to set
107      */

108     public void setSearchWord(String JavaDoc searchWord) {
109         this.searchWord = searchWord;
110     }
111
112 }
113
Popular Tags