1 |
41791
|
argiro.kok
|
package eu.dnetlib.data.claims.migration.entity;
|
2 |
40773
|
argiro.kok
|
|
3 |
41195
|
argiro.kok
|
import eu.dnetlib.data.claimsDemo.ClaimUtils;
|
4 |
40773
|
argiro.kok
|
|
5 |
46755
|
katerina.i
|
import java.util.TreeMap;
|
6 |
|
|
|
7 |
40773
|
argiro.kok
|
/**
|
8 |
|
|
* Created by kiatrop on 20/11/2015.
|
9 |
|
|
*/
|
10 |
41791
|
argiro.kok
|
public class Result implements OpenaireEntity{
|
11 |
40773
|
argiro.kok
|
private String title;
|
12 |
46755
|
katerina.i
|
private TreeMap<String, String> authors = new TreeMap<String, String>();
|
13 |
|
|
|
14 |
41444
|
argiro.kok
|
//external url: url+doi (if doi exists) or url from websources
|
15 |
40773
|
argiro.kok
|
private String externalUrl;
|
16 |
|
|
private String openaireId;
|
17 |
|
|
private String doi;
|
18 |
41104
|
argiro.kok
|
private String orcidworkid;
|
19 |
|
|
private String pmcid;
|
20 |
40773
|
argiro.kok
|
//accessRights : set by user
|
21 |
|
|
private String accessRights;
|
22 |
|
|
//bestLicence : from search
|
23 |
|
|
private String bestLicense;
|
24 |
|
|
|
25 |
|
|
private String collectedFrom;
|
26 |
41408
|
argiro.kok
|
private String metadataRecord;
|
27 |
|
|
|
28 |
|
|
//for the metadataRecord file
|
29 |
|
|
private String recordPath;
|
30 |
|
|
private String recordFormat;
|
31 |
|
|
|
32 |
40773
|
argiro.kok
|
private String resultType;
|
33 |
41791
|
argiro.kok
|
// private boolean found=false;
|
34 |
41157
|
argiro.kok
|
private String embargoEndDate;
|
35 |
40773
|
argiro.kok
|
|
36 |
41350
|
argiro.kok
|
//Used for Datacite
|
37 |
|
|
private String oai;
|
38 |
|
|
private String provenanceaction;
|
39 |
41157
|
argiro.kok
|
|
40 |
46755
|
katerina.i
|
public TreeMap<String, String> getAuthors() {
|
41 |
|
|
return authors;
|
42 |
|
|
}
|
43 |
41157
|
argiro.kok
|
|
44 |
46755
|
katerina.i
|
public void setAuthors(TreeMap<String, String> authors) {
|
45 |
|
|
this.authors = authors;
|
46 |
|
|
}
|
47 |
|
|
|
48 |
41157
|
argiro.kok
|
public String getDoi() {
|
49 |
40773
|
argiro.kok
|
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 |
41350
|
argiro.kok
|
public String getExternalUrl() {
|
65 |
40773
|
argiro.kok
|
return externalUrl;
|
66 |
|
|
}
|
67 |
|
|
|
68 |
41350
|
argiro.kok
|
public void setExternalUrl(String externalUrl) {
|
69 |
|
|
this.externalUrl = externalUrl;
|
70 |
40773
|
argiro.kok
|
}
|
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 |
41195
|
argiro.kok
|
collectedFrom = ClaimUtils.COLLECTED_FROM_DATACITE;
|
104 |
40773
|
argiro.kok
|
|
105 |
|
|
} else if (collectedFrom.equals("Crossref")) {
|
106 |
41195
|
argiro.kok
|
collectedFrom = ClaimUtils.COLLECTED_FROM_CROSSREF;
|
107 |
40773
|
argiro.kok
|
|
108 |
|
|
} else if (collectedFrom.equals("Orcid")) {
|
109 |
41195
|
argiro.kok
|
collectedFrom = ClaimUtils.COLLECTED_FROM_ORCID;
|
110 |
40773
|
argiro.kok
|
|
111 |
|
|
} else {
|
112 |
41195
|
argiro.kok
|
collectedFrom = ClaimUtils.COLLECTED_FROM_OPENAIRE;
|
113 |
40773
|
argiro.kok
|
}
|
114 |
|
|
}
|
115 |
|
|
this.collectedFrom = collectedFrom;
|
116 |
|
|
}
|
117 |
|
|
|
118 |
41408
|
argiro.kok
|
public String getMetadataRecord() {
|
119 |
|
|
return metadataRecord;
|
120 |
40773
|
argiro.kok
|
}
|
121 |
|
|
|
122 |
41408
|
argiro.kok
|
public void setMetadataRecord(String metadataRecord) {
|
123 |
|
|
this.metadataRecord = metadataRecord;
|
124 |
40773
|
argiro.kok
|
}
|
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 |
41791
|
argiro.kok
|
/* public boolean isFound() {
|
137 |
40773
|
argiro.kok
|
return found;
|
138 |
|
|
}
|
139 |
|
|
|
140 |
|
|
public void setFound(boolean found) {
|
141 |
|
|
this.found = found;
|
142 |
41791
|
argiro.kok
|
}*/
|
143 |
40773
|
argiro.kok
|
|
144 |
41104
|
argiro.kok
|
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 |
41157
|
argiro.kok
|
public String getEmbargoEndDate() {
|
161 |
|
|
return embargoEndDate;
|
162 |
|
|
}
|
163 |
|
|
|
164 |
|
|
public void setEmbargoEndDate(String embargoEndDate) {
|
165 |
|
|
this.embargoEndDate = embargoEndDate;
|
166 |
|
|
}
|
167 |
|
|
|
168 |
41350
|
argiro.kok
|
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 |
41408
|
argiro.kok
|
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 |
40773
|
argiro.kok
|
@Override
|
201 |
|
|
public String toString() {
|
202 |
|
|
return "\nResult{" +
|
203 |
|
|
"title='" + title + '\'' +
|
204 |
|
|
",\n external_url='" + externalUrl + '\'' +
|
205 |
|
|
",\n openaire_id='" + openaireId + '\'' +
|
206 |
41104
|
argiro.kok
|
",\n doi='" + doi + '\'' +
|
207 |
|
|
",\n pmcid='" + pmcid + '\'' +
|
208 |
|
|
",\n orcidworkid='" + orcidworkid + '\'' +
|
209 |
40773
|
argiro.kok
|
",\n accessRights='" + accessRights + '\'' +
|
210 |
41157
|
argiro.kok
|
",\n embargoEndDate='" + embargoEndDate + '\'' +
|
211 |
41104
|
argiro.kok
|
",\n bestLicense='" + bestLicense + '\'' +
|
212 |
40773
|
argiro.kok
|
",\n collectedFrom='" + collectedFrom + '\'' +
|
213 |
41350
|
argiro.kok
|
",\n oai='" + oai + '\'' +
|
214 |
|
|
",\n provenanceaction='" + provenanceaction + '\'' +
|
215 |
41444
|
argiro.kok
|
",\n metadataRecord='" + ((metadataRecord!=null)?metadataRecord.substring(0,60):null) + "...\'" +
|
216 |
41408
|
argiro.kok
|
",\n recordPath='" + recordPath + '\'' +
|
217 |
|
|
",\n recordFormat='" + recordFormat + '\'' +
|
218 |
40773
|
argiro.kok
|
",\n resultType='" + resultType + '\'' +
|
219 |
49865
|
argiro.kok
|
",\n authors='" + authors + '\'' +
|
220 |
40773
|
argiro.kok
|
'}';
|
221 |
|
|
}
|
222 |
41408
|
argiro.kok
|
//method to ask from API of search to get the metadataRecord
|
223 |
40773
|
argiro.kok
|
//then parse the fields
|
224 |
|
|
}
|