1 |
41755
|
sandro.lab
|
package eu.dnetlib.rmi.provision;
|
2 |
28338
|
sandro.lab
|
|
3 |
|
|
import javax.xml.bind.annotation.XmlAttribute;
|
4 |
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
5 |
|
|
|
6 |
|
|
/**
|
7 |
|
|
* <pre>
|
8 |
|
|
* {@code
|
9 |
|
|
* <groupresult field="facetFieldName">
|
10 |
|
|
* <value>facetFieldValue</value>
|
11 |
|
|
* <count>1</count>
|
12 |
|
|
* </groupresult>
|
13 |
|
|
* }
|
14 |
|
|
* </pre>
|
15 |
41755
|
sandro.lab
|
*
|
16 |
28338
|
sandro.lab
|
* @author claudio
|
17 |
|
|
*/
|
18 |
|
|
@XmlRootElement(namespace = "", name = "groupresult")
|
19 |
|
|
public class GroupResult {
|
20 |
|
|
|
21 |
|
|
private String name;
|
22 |
|
|
|
23 |
|
|
private String value;
|
24 |
|
|
|
25 |
|
|
private int count;
|
26 |
|
|
|
27 |
41755
|
sandro.lab
|
public GroupResult() {
|
28 |
|
|
}
|
29 |
28338
|
sandro.lab
|
|
30 |
|
|
/**
|
31 |
|
|
* Builds a groupResult.
|
32 |
41755
|
sandro.lab
|
*
|
33 |
28338
|
sandro.lab
|
* @param fieldName
|
34 |
|
|
* @param fieldValue
|
35 |
|
|
* @param count
|
36 |
|
|
*/
|
37 |
|
|
public GroupResult(final String name, final String value, final int count) {
|
38 |
|
|
this.name = name;
|
39 |
|
|
this.value = value;
|
40 |
|
|
this.count = count;
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
@Override
|
44 |
|
|
public boolean equals(final Object obj) {
|
45 |
|
|
if (!(obj instanceof GroupResult)) return false;
|
46 |
|
|
final GroupResult g = (GroupResult) obj;
|
47 |
|
|
if ((this.getCount() == g.getCount()) && this.getName().equals(g.getName()) && this.getValue().equals(g.getValue())) return true;
|
48 |
|
|
return false;
|
49 |
|
|
}
|
50 |
|
|
|
51 |
|
|
@XmlAttribute(name = "field", required = true)
|
52 |
|
|
public String getName() {
|
53 |
|
|
return name;
|
54 |
|
|
}
|
55 |
|
|
|
56 |
41755
|
sandro.lab
|
public void setName(final String name) {
|
57 |
|
|
this.name = name;
|
58 |
|
|
}
|
59 |
|
|
|
60 |
28338
|
sandro.lab
|
public String getValue() {
|
61 |
|
|
return value;
|
62 |
|
|
}
|
63 |
|
|
|
64 |
41755
|
sandro.lab
|
public void setValue(final String value) {
|
65 |
|
|
this.value = value;
|
66 |
|
|
}
|
67 |
|
|
|
68 |
28338
|
sandro.lab
|
public int getCount() {
|
69 |
|
|
return count;
|
70 |
|
|
}
|
71 |
|
|
|
72 |
|
|
public void setCount(final int count) {
|
73 |
|
|
this.count = count;
|
74 |
|
|
}
|
75 |
|
|
|
76 |
|
|
}
|