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 java.util.ArrayList;
|
---|
28 | import org.greenstone.gatherer.util.StaticStrings;
|
---|
29 | import org.w3c.dom.Element;
|
---|
30 |
|
---|
31 | /** This class encapsulates a facet field - used by SOLR
|
---|
32 | It basically is an index, with a different field name */
|
---|
33 |
|
---|
34 | public class Facet extends Index {
|
---|
35 |
|
---|
36 | static final String facet_element = StaticStrings.FACET_ELEMENT;
|
---|
37 | //protected String default_element_name = null; // don't have default at this stage
|
---|
38 |
|
---|
39 | public Facet() {
|
---|
40 | }
|
---|
41 |
|
---|
42 | public Facet(Element element) {
|
---|
43 | super(element);
|
---|
44 | }
|
---|
45 |
|
---|
46 | public Facet(ArrayList sources) {
|
---|
47 | super(sources);
|
---|
48 | }
|
---|
49 |
|
---|
50 | protected String getElementName() {
|
---|
51 | return facet_element;
|
---|
52 | }
|
---|
53 |
|
---|
54 | protected String getDefaultElementName() {
|
---|
55 | return null; //StaticSTrings.FACET_DEFAULT_ELEMENT;
|
---|
56 | }
|
---|
57 |
|
---|
58 | public DOMProxyListEntry create(Element element) {
|
---|
59 | return new Facet(element);
|
---|
60 | }
|
---|
61 |
|
---|
62 | public DOMProxyListEntry create(ArrayList sources) {
|
---|
63 | return new Facet(sources);
|
---|
64 | }
|
---|
65 |
|
---|
66 |
|
---|
67 | } |
---|