1
|
package eu.dnetlib.data.bulktag;
|
2
|
|
3
|
import com.google.gson.Gson;
|
4
|
import org.dom4j.Node;
|
5
|
|
6
|
|
7
|
/**
|
8
|
* Created by miriam on 01/08/2018.
|
9
|
*/
|
10
|
public class ZenodoCommunity {
|
11
|
|
12
|
private String zenodoCommunityId;
|
13
|
|
14
|
private SelectionConstraints selCriteria;
|
15
|
|
16
|
public String getZenodoCommunityId() {
|
17
|
return zenodoCommunityId;
|
18
|
}
|
19
|
|
20
|
public void setZenodoCommunityId(String zenodoCommunityId) {
|
21
|
this.zenodoCommunityId = zenodoCommunityId;
|
22
|
}
|
23
|
|
24
|
public SelectionConstraints getSelCriteria() {
|
25
|
return selCriteria;
|
26
|
}
|
27
|
|
28
|
public void setSelCriteria(SelectionConstraints selCriteria) {
|
29
|
this.selCriteria = selCriteria;
|
30
|
}
|
31
|
|
32
|
private void setSelCriteria(String json){
|
33
|
//Type collectionType = new TypeToken<Collection<Constraints>>(){}.getType();
|
34
|
selCriteria = new Gson().fromJson(json, SelectionConstraints.class);
|
35
|
|
36
|
}
|
37
|
|
38
|
public void setSelCriteria(Node n){
|
39
|
if (n==null){
|
40
|
selCriteria = null;
|
41
|
}else{
|
42
|
setSelCriteria(n.getText());
|
43
|
}
|
44
|
}
|
45
|
|
46
|
}
|