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 | */
|
---|
25 | package org.greenstone.gatherer.cdm;
|
---|
26 |
|
---|
27 | import org.greenstone.gatherer.util.StaticStrings;
|
---|
28 | import org.w3c.dom.*;
|
---|
29 |
|
---|
30 | /** Handles facets for solr collections */
|
---|
31 | public class FacetManager extends BaseIndexManager {
|
---|
32 |
|
---|
33 |
|
---|
34 | public FacetManager(Element facets, String current_build_type) {
|
---|
35 | super(facets, current_build_type, StaticStrings.FACET_ELEMENT, null, new Facet());
|
---|
36 | this.controls_title_key = "CDM.FacetManager.Title";
|
---|
37 | this.new_button_tooltip_key = "CDM.FacetManager.New_Button_Tooltip";
|
---|
38 | this.edit_button_tooltip_key = "CDM.FacetManager.Edit_Button_Tooltip";
|
---|
39 | this.remove_button_tooltip_key = "CDM.FacetManager.Remove_Button_Tooltip";
|
---|
40 | this.nip_new_index_key = "CDM.FacetManager.New";
|
---|
41 | this.nip_edit_index_key = "CDM.FacetManager.Edit";
|
---|
42 | this.nip_source_label_key = "CDM.FacetManager.Source";
|
---|
43 | this.nip_source_tooltip_key = "CDM.FacetManager.Source_Tooltip";
|
---|
44 |
|
---|
45 | this.nip_add_index_button_key = "CDM.FacetManager.Add";
|
---|
46 | this.nip_add_index_tooltip_key = "CDM.FacetManager.Add_Tooltip";
|
---|
47 | this.nip_replace_index_button_key = "CDM.FacetManager.Replace";
|
---|
48 | this.nip_replace_index_tooltip_key = "CDM.FacetManager.Replace_Tooltip";
|
---|
49 |
|
---|
50 | }
|
---|
51 |
|
---|
52 | public void buildTypeChanged(String new_build_type) {
|
---|
53 | if (new_build_type.equals(BuildTypeManager.BUILD_TYPE_SOLR)) {
|
---|
54 | // activate
|
---|
55 | setAssigned(true);
|
---|
56 | } else {
|
---|
57 | // deactivate
|
---|
58 | setAssigned(false);
|
---|
59 | }
|
---|
60 | }
|
---|
61 |
|
---|
62 | }
|
---|