Mercurial > hg > LGServices
comparison src/main/java/de/mpiwg/gazetteer/dataverse/DVDataDepositAPI.java @ 0:3e62083dbcbf
First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Thu, 23 Apr 2015 15:46:01 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e62083dbcbf |
---|---|
1 package de.mpiwg.gazetteer.dataverse; | |
2 | |
3 import de.mpiwg.gazetteer.utils.HTTPUtils; | |
4 import de.mpiwg.gazetteer.utils.HTTPUtils.HttpStringResponse; | |
5 | |
6 /** | |
7 * Doc: http://thedata.harvard.edu/guides/dataverse-api-main.html#data-deposit-api | |
8 * @author jurzua | |
9 * | |
10 */ | |
11 public class DVDataDepositAPI { | |
12 | |
13 private static String user = "jurzua"; | |
14 private static String pwd = "221082"; | |
15 //curl https://jurzua:221082@thedata.harvard.edu/dvn/api/data-deposit/v1/swordv2/service-document | |
16 | |
17 | |
18 public static String retrieveSWORDServiceDocument(String user, String pwd) throws Exception{ | |
19 HttpStringResponse resp = | |
20 HTTPUtils.getStringResponse("https://" + user + ":" + pwd + "@thedata.harvard.edu/dvn/api/data-deposit/v1/swordv2/service-document"); | |
21 return resp.content; | |
22 } | |
23 | |
24 public static void createStudy(String xmlFile){ | |
25 //TODO | |
26 } | |
27 | |
28 public static void addFiles2Study(){ | |
29 | |
30 } | |
31 | |
32 public static void listStudies(){ | |
33 | |
34 } | |
35 | |
36 public static void deleteStudy(){} | |
37 | |
38 public static void deaccessStudy() {} | |
39 | |
40 public static void releaseStudy() {} | |
41 | |
42 | |
43 } |