Revision 46561
Added by Argiro Kokogiannaki about 7 years ago
insertClaim.component.ts | ||
---|---|---|
200 | 200 |
var claim = { claimedBy : user, sourceId : result.id, sourceType : result.type, sourceCollectedFrom: result.source, sourceAccessRights: result.accessRights, sourceEmbargoEndDate: result.embargoEndDate, targetId : inlineResult.id , targetType : inlineResult.type, targetCollectedFrom: inlineResult.source, targetAccessRights: inlineResult.accessRights, targetEmbargoEndDate: (inlineResult.embargoEndDate == null?"":inlineResult.embargoEndDate)}; |
201 | 201 |
return claim; |
202 | 202 |
} |
203 |
createDirectClaim(result, projects, contexts){ |
|
204 |
var entity = {}; |
|
205 |
entity["originalId"]=""; |
|
206 |
entity["title"]=""; |
|
207 |
entity["authors"]=[]; |
|
208 |
entity["publisher"]=""; |
|
209 |
entity["description"]=""; |
|
210 |
entity["language"]=""; |
|
211 |
entity["type"]=result.type; |
|
212 |
entity["pids"]= [];//{type:string, value:string}[]; |
|
213 |
entity["licenseCode"]=result.accessRights; |
|
214 |
if(result.accessRights == "EMBARGO"){ |
|
215 |
entity["embargoEndDate"]=result.embargoEndDate; |
|
216 |
} |
|
217 |
entity["resourceType"]=""; |
|
218 |
entity["url"]=""; |
|
219 |
entity["collectedFromId"]=""; |
|
220 |
entity["linksToProjects"]=[]; |
|
221 |
entity["contexts"]=[]; |
|
222 |
for(var i =0; i < contexts.length; i++){ |
|
223 |
entity["contexts"].push(contexts[i].concept.id); |
|
224 |
} |
|
203 | 225 |
|
226 |
/* |
|
227 |
{ |
|
228 |
"originalId": "ORIG_ID_12345", |
|
229 |
"title": "TEST TITLE", |
|
230 |
"authors": [ |
|
231 |
"Michele Artini", |
|
232 |
"Claudio Atzori", |
|
233 |
"Alessia Bardi" |
|
234 |
], |
|
235 |
"publisher": "Test publisher", |
|
236 |
"description": "DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION", |
|
237 |
"language": "ita", |
|
238 |
"pids": [ |
|
239 |
{ |
|
240 |
"type": "doi", |
|
241 |
"value": "10.000/xyz-123" |
|
242 |
}, |
|
243 |
{ |
|
244 |
"type": "oai", |
|
245 |
"value": "oai:1234" |
|
246 |
} |
|
247 |
], |
|
248 |
"licenseCode": "OPEN", |
|
249 |
"resourceType": "0001", |
|
250 |
"url": "http://test.it/xyz", |
|
251 |
"collectedFromId": "opendoar____::2659", |
|
252 |
"hostedById": "opendoar____::2367", |
|
253 |
"linksToProjects": [ |
|
254 |
"info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus", |
|
255 |
"info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble" |
|
256 |
], |
|
257 |
"contexts": [ |
|
258 |
"egi::classification::natsc::math::pure", |
|
259 |
"egi::classification::natsc::math::stats" |
|
260 |
] |
|
261 |
} |
|
262 |
*/ |
|
263 |
|
|
264 |
} |
|
204 | 265 |
confirmOpen(){ |
205 | 266 |
this.alert.cancelButton = true; |
206 | 267 |
this.alert.okButton = true; |
Also available in: Unified diff
more layout changes for linking - simplify linking - easy switch between bulk and search mode