1 /* Copyright (c) 2008 Sascha Kohlmann
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU Affero General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Affero General Public License for more details.
12 *
13 * You should have received a copy of the GNU Affero General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 package net.sf.eos.search;
17
18 import net.sf.eos.Metadata;
19
20 import java.util.List;
21 import java.util.Map;
22
23 /**
24 * Bean holder for lookup data.
25 * @author Sascha Kohlmann
26 */
27 public class LookupEntry implements Metadata {
28
29 private String id;
30 private String commonName;
31 private float relevance;
32
33 private Map<String, List<String>> meta;
34
35 /**
36 * Returns the ID of the entry.
37 * @return the ID of the entry
38 */
39 public String getId() {
40 return this.id;
41 }
42
43 /**
44 * Returns the common name of a named entity.
45 * @return the common name of a named entity
46 */
47 public String getCommonName() {
48 return this.commonName;
49 }
50
51 /**
52 * Returns the relevance of the entry.
53 * @return the relevance of the entry
54 */
55 public float getRelevance() {
56 return this.relevance;
57 }
58
59 /**
60 * Returns the metadata of an entry.
61 * @return the metadata of an entry.
62 */
63 public Map<String, List<String>> getMeta() {
64 return this.meta;
65 }
66
67 /**
68 * Sets the ID of the entry.
69 * @param id the ID of the entry
70 */
71 public void setId(@SuppressWarnings("hiding") final String id) {
72 this.id = id;
73 }
74
75 /**
76 * Sets the common name of the entry.
77 * @param commonName the common name of the entry
78 */
79 public void setCommonName(@SuppressWarnings("hiding")
80 final String commonName) {
81 this.commonName = commonName;
82 }
83
84 /**
85 * Sets the relevance of the entry.
86 * @param relevance the relevance of the entry
87 */
88 public void setRelevance(@SuppressWarnings("hiding")
89 final float relevance) {
90 this.relevance = relevance;
91 }
92 }