Changeset 10528
- Timestamp:
- 2005-08-19T11:34:33+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r10237 r10528 54 54 static final private Dimension LABEL_SIZE = new Dimension(150, 25); 55 55 56 static final public String BUILD_TYPE_LUCENE = "lucene"; 57 static final public String BUILD_TYPE_MGPP = "mgpp"; 58 56 59 static final public String[] SEARCH_TYPES = { "plain" , "form"}; 57 static final public String[] BUILD_TYPES = { "lucene", "mgpp"};60 static final public String[] BUILD_TYPES = { BUILD_TYPE_LUCENE, BUILD_TYPE_MGPP }; 58 61 59 62 /** the buildtype element in the config file - searchtypemanager looks … … 105 108 * @return true if MGPP is enabled, false otherwise 106 109 */ 107 public boolean is MGPPEnabled() {110 public boolean isSearchTypeEnabled() { 108 111 return root.getAttribute(CollectionConfiguration.ASSIGNED_ATTRIBUTE).equals(CollectionConfiguration.TRUE_STR); 112 } 113 114 public boolean isMGPP() { 115 return isSearchTypeEnabled() && build_type.getValue(CollectionMeta.TEXT).equals(BUILD_TYPE_MGPP); 116 } 117 118 public boolean isLucene() { 119 return isSearchTypeEnabled() && build_type.getValue(CollectionMeta.TEXT).equals(BUILD_TYPE_LUCENE); 109 120 } 110 121 … … 212 223 } else { 213 224 build_type.setValue((String)build_type_combobox.getSelectedItem()); 214 build_type.setAssigned(is MGPPEnabled());225 build_type.setAssigned(isSearchTypeEnabled()); 215 226 216 227 } … … 340 351 public void gainFocus() { 341 352 instructions_textarea.setCaretPosition(0); 342 validateControls(is MGPPEnabled());353 validateControls(isSearchTypeEnabled()); 343 354 } 344 355
Note:
See TracChangeset
for help on using the changeset viewer.