source: main/trunk/gli/src/org/greenstone/gatherer/cdm/SortFieldManager.java@ 36172

Last change on this file since 36172 was 36172, checked in by kjdon, 2 years ago

added another dictionary key

File size: 2.8 KB
Line 
1/**
2 *#########################################################################
3 *
4 * A component of the Gatherer application, part of the Greenstone digital
5 * library suite from the New Zealand Digital Library Project at the
6 * University of Waikato, New Zealand.
7 *
8 * Copyright (C) 2022 New Zealand Digital Library Project
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *########################################################################
24 */
25package org.greenstone.gatherer.cdm;
26
27import org.greenstone.gatherer.util.StaticStrings;
28import org.w3c.dom.*;
29
30/** handles sortfields for lucene and solr collections */
31public class SortFieldManager extends BaseIndexManager {
32
33 public SortFieldManager(Element sortfields, String current_build_type) {
34 super(sortfields, current_build_type, StaticStrings.SORT_ELEMENT, StaticStrings.SORT_DEFAULT_ELEMENT, new SortField());
35 this.controls_title_key = "CDM.SortFieldManager.Title";
36 this.new_button_tooltip_key = "CDM.SortFieldManager.New_Button_Tooltip";
37 this.edit_button_tooltip_key = "CDM.SortFieldManager.Edit_Button_Tooltip";
38 this.remove_button_tooltip_key = "CDM.SortFieldManager.Remove_Button_Tooltip";
39 this.default_indicator_key = "CDM.SortFieldManager.Default_Sort_Indicator";
40 this.set_default_tooltip_key = "CDM.SortFieldManager.Set_Default_Tooltip";
41 this.nip_new_index_key = "CDM.SortFieldManager.New";
42 this.nip_edit_index_key = "CDM.SortFieldManager.Edit";
43 this.nip_source_label_key = "CDM.SortFieldManager.Source";
44 this.nip_source_tooltip_key = "CDM.SortFieldManager.Source_Tooltip";
45
46 this.nip_add_index_button_key = "CDM.SortFieldManager.Add";
47 this.nip_add_index_tooltip_key = "CDM.SortFieldManager.Add_Tooltip";
48 this.nip_replace_index_button_key = "CDM.SortFieldManager.Replace";
49 this.nip_replace_index_tooltip_key = "CDM.SortFieldManager.Replace_Tooltip";
50 }
51
52 public void buildTypeChanged(String new_build_type) {
53 if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)|| new_build_type.equals(BuildTypeManager.BUILD_TYPE_LUCENE)) {
54 // activate
55 setAssigned(true);
56 } else {
57 // deactivate
58 setAssigned(false);
59 }
60 }
61
62}
Note: See TracBrowser for help on using the repository browser.