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