1 |
58021
|
konstantin
|
package eu.dnetlib.uoaadmintoolslibrary.entities;
|
2 |
|
|
|
3 |
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
4 |
|
|
import org.springframework.data.annotation.Id;
|
5 |
|
|
|
6 |
|
|
import java.util.List;
|
7 |
|
|
|
8 |
|
|
public class DivId {
|
9 |
|
|
@Id
|
10 |
|
|
@JsonProperty("_id")
|
11 |
|
|
private String id;
|
12 |
|
|
|
13 |
|
|
private String name;
|
14 |
|
|
private List<String> pages;
|
15 |
59376
|
konstantin
|
private PortalType portalType; // explore, connect, community, monitor
|
16 |
58021
|
konstantin
|
|
17 |
58022
|
konstantin
|
// private Boolean connect;
|
18 |
|
|
// private Boolean communities;
|
19 |
|
|
// private Boolean openaire;
|
20 |
|
|
|
21 |
58021
|
konstantin
|
public DivId() {}
|
22 |
|
|
|
23 |
|
|
public DivId(DivId divId) {
|
24 |
|
|
setName(divId.getName());
|
25 |
|
|
setPages(divId.getPages());
|
26 |
58038
|
konstantin
|
setPortalType(divId.getPortalType());
|
27 |
58021
|
konstantin
|
}
|
28 |
|
|
|
29 |
|
|
public String getId() {
|
30 |
|
|
return id;
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
public void setId(String id) {
|
34 |
|
|
this.id = id;
|
35 |
|
|
}
|
36 |
|
|
|
37 |
|
|
public String getName() {
|
38 |
|
|
return name;
|
39 |
|
|
}
|
40 |
|
|
|
41 |
|
|
public void setName(String name) {
|
42 |
|
|
this.name = name;
|
43 |
|
|
}
|
44 |
|
|
|
45 |
|
|
public List<String> getPages() {
|
46 |
|
|
return pages;
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
public void setPages(List<String> pages) {
|
50 |
|
|
this.pages = pages;
|
51 |
|
|
}
|
52 |
|
|
|
53 |
59376
|
konstantin
|
public String getPortalType() {
|
54 |
|
|
if(portalType == null) {
|
55 |
|
|
return null;
|
56 |
|
|
}
|
57 |
|
|
return portalType.name();
|
58 |
|
|
}
|
59 |
58021
|
konstantin
|
|
60 |
59376
|
konstantin
|
public void setPortalType(String portalType) {
|
61 |
|
|
if(portalType == null) {
|
62 |
|
|
this.portalType = null;
|
63 |
|
|
} else {
|
64 |
|
|
PortalType pType = PortalType.valueOf(portalType);
|
65 |
|
|
this.portalType = pType;
|
66 |
|
|
}
|
67 |
|
|
}
|
68 |
58021
|
konstantin
|
}
|