1
|
package eu.dnetlib.data.claims.migration.entity;
|
2
|
|
3
|
import eu.dnetlib.data.claimsDemo.ClaimUtils;
|
4
|
|
5
|
import java.util.TreeMap;
|
6
|
|
7
|
/**
|
8
|
* Created by kiatrop on 20/11/2015.
|
9
|
*/
|
10
|
public class Result implements OpenaireEntity{
|
11
|
private String title;
|
12
|
private TreeMap<String, String> authors = new TreeMap<String, String>();
|
13
|
|
14
|
//external url: url+doi (if doi exists) or url from websources
|
15
|
private String externalUrl;
|
16
|
private String openaireId;
|
17
|
private String doi;
|
18
|
private String orcidworkid;
|
19
|
private String pmcid;
|
20
|
//accessRights : set by user
|
21
|
private String accessRights;
|
22
|
//bestLicence : from search
|
23
|
private String bestLicense;
|
24
|
|
25
|
private String collectedFrom;
|
26
|
private String metadataRecord;
|
27
|
|
28
|
//for the metadataRecord file
|
29
|
private String recordPath;
|
30
|
private String recordFormat;
|
31
|
|
32
|
private String resultType;
|
33
|
// private boolean found=false;
|
34
|
private String embargoEndDate;
|
35
|
|
36
|
//Used for Datacite
|
37
|
private String oai;
|
38
|
private String provenanceaction;
|
39
|
|
40
|
public TreeMap<String, String> getAuthors() {
|
41
|
return authors;
|
42
|
}
|
43
|
|
44
|
public void setAuthors(TreeMap<String, String> authors) {
|
45
|
this.authors = authors;
|
46
|
}
|
47
|
|
48
|
public String getDoi() {
|
49
|
return doi;
|
50
|
}
|
51
|
|
52
|
public void setDoi(String doi) {
|
53
|
this.doi = doi;
|
54
|
}
|
55
|
|
56
|
public String getTitle() {
|
57
|
return title;
|
58
|
}
|
59
|
|
60
|
public void setTitle(String title) {
|
61
|
this.title = title;
|
62
|
}
|
63
|
|
64
|
public String getExternalUrl() {
|
65
|
return externalUrl;
|
66
|
}
|
67
|
|
68
|
public void setExternalUrl(String externalUrl) {
|
69
|
this.externalUrl = externalUrl;
|
70
|
}
|
71
|
|
72
|
public String getOpenaireId() {
|
73
|
return openaireId;
|
74
|
}
|
75
|
|
76
|
public void setOpenaireId(String openaire_id) {
|
77
|
this.openaireId = openaire_id;
|
78
|
}
|
79
|
|
80
|
public String getAccessRights() {
|
81
|
return accessRights;
|
82
|
}
|
83
|
|
84
|
public void setAccessRights(String accessRights) {
|
85
|
this.accessRights = accessRights;
|
86
|
}
|
87
|
|
88
|
public String getBestLicense() {
|
89
|
return bestLicense;
|
90
|
}
|
91
|
|
92
|
public void setBestLicense(String bestLicense) {
|
93
|
this.bestLicense = bestLicense;
|
94
|
}
|
95
|
|
96
|
public String getCollectedFrom() {
|
97
|
return collectedFrom;
|
98
|
}
|
99
|
|
100
|
public void setCollectedFrom(String collectedFrom) {
|
101
|
if(!collectedFrom.contains("____::")) {
|
102
|
if (collectedFrom.equals("Datacite")) {
|
103
|
collectedFrom = ClaimUtils.COLLECTED_FROM_DATACITE;
|
104
|
|
105
|
} else if (collectedFrom.equals("Crossref")) {
|
106
|
collectedFrom = ClaimUtils.COLLECTED_FROM_CROSSREF;
|
107
|
|
108
|
} else if (collectedFrom.equals("Orcid")) {
|
109
|
collectedFrom = ClaimUtils.COLLECTED_FROM_ORCID;
|
110
|
|
111
|
} else {
|
112
|
collectedFrom = ClaimUtils.COLLECTED_FROM_OPENAIRE;
|
113
|
}
|
114
|
}
|
115
|
this.collectedFrom = collectedFrom;
|
116
|
}
|
117
|
|
118
|
public String getMetadataRecord() {
|
119
|
return metadataRecord;
|
120
|
}
|
121
|
|
122
|
public void setMetadataRecord(String metadataRecord) {
|
123
|
this.metadataRecord = metadataRecord;
|
124
|
}
|
125
|
|
126
|
public String getResultType() {
|
127
|
return resultType;
|
128
|
}
|
129
|
|
130
|
public void setResultType(String resultType) {
|
131
|
this.resultType = resultType;
|
132
|
}
|
133
|
|
134
|
|
135
|
|
136
|
/* public boolean isFound() {
|
137
|
return found;
|
138
|
}
|
139
|
|
140
|
public void setFound(boolean found) {
|
141
|
this.found = found;
|
142
|
}*/
|
143
|
|
144
|
public String getPmcid() {
|
145
|
return pmcid;
|
146
|
}
|
147
|
|
148
|
public void setPmcid(String pmcid) {
|
149
|
this.pmcid = pmcid;
|
150
|
}
|
151
|
|
152
|
public String getOrcidworkid() {
|
153
|
return orcidworkid;
|
154
|
}
|
155
|
|
156
|
public void setOrcidworkid(String orcidworkid) {
|
157
|
this.orcidworkid = orcidworkid;
|
158
|
}
|
159
|
|
160
|
public String getEmbargoEndDate() {
|
161
|
return embargoEndDate;
|
162
|
}
|
163
|
|
164
|
public void setEmbargoEndDate(String embargoEndDate) {
|
165
|
this.embargoEndDate = embargoEndDate;
|
166
|
}
|
167
|
|
168
|
public String getOai() {
|
169
|
return oai;
|
170
|
}
|
171
|
|
172
|
public void setOai(String oai) {
|
173
|
this.oai = oai;
|
174
|
}
|
175
|
|
176
|
public String getProvenanceaction() {
|
177
|
return provenanceaction;
|
178
|
}
|
179
|
|
180
|
public void setProvenanceaction(String provenanceaction) {
|
181
|
this.provenanceaction = provenanceaction;
|
182
|
}
|
183
|
|
184
|
public String getRecordPath() {
|
185
|
return recordPath;
|
186
|
}
|
187
|
|
188
|
public void setRecordPath(String recordPath) {
|
189
|
this.recordPath = recordPath;
|
190
|
}
|
191
|
|
192
|
public String getRecordFormat() {
|
193
|
return recordFormat;
|
194
|
}
|
195
|
|
196
|
public void setRecordFormat(String recordFormat) {
|
197
|
this.recordFormat = recordFormat;
|
198
|
}
|
199
|
|
200
|
@Override
|
201
|
public String toString() {
|
202
|
return "\nResult{" +
|
203
|
"title='" + title + '\'' +
|
204
|
",\n external_url='" + externalUrl + '\'' +
|
205
|
",\n openaire_id='" + openaireId + '\'' +
|
206
|
",\n doi='" + doi + '\'' +
|
207
|
",\n pmcid='" + pmcid + '\'' +
|
208
|
",\n orcidworkid='" + orcidworkid + '\'' +
|
209
|
",\n accessRights='" + accessRights + '\'' +
|
210
|
",\n embargoEndDate='" + embargoEndDate + '\'' +
|
211
|
",\n bestLicense='" + bestLicense + '\'' +
|
212
|
",\n collectedFrom='" + collectedFrom + '\'' +
|
213
|
",\n oai='" + oai + '\'' +
|
214
|
",\n provenanceaction='" + provenanceaction + '\'' +
|
215
|
",\n metadataRecord='" + ((metadataRecord!=null)?metadataRecord.substring(0,60):null) + "...\'" +
|
216
|
",\n recordPath='" + recordPath + '\'' +
|
217
|
",\n recordFormat='" + recordFormat + '\'' +
|
218
|
",\n resultType='" + resultType + '\'' +
|
219
|
",\n authors='" + authors + '\'' +
|
220
|
'}';
|
221
|
}
|
222
|
//method to ask from API of search to get the metadataRecord
|
223
|
//then parse the fields
|
224
|
}
|