0
|
1 package de.mpiwg.itgroup.eSciDoc.Tools;
|
|
2 import java.util.ArrayList;
|
|
3 import java.util.HashMap;
|
|
4
|
|
5 import org.apache.http.HttpResponse;
|
|
6
|
|
7
|
|
8 public class IngestECHOCall {
|
|
9
|
|
10 public static void main(String[] args) throws Exception{
|
|
11 System.out.println("Starting ECHO call");
|
|
12 String user=args[0];
|
|
13 String password=args[1];
|
|
14
|
|
15 IngestECHO ie = new IngestECHO(user,password);
|
|
16 //ie.ingestECHOCollections();
|
|
17 //ie.deleteAllContentOfCollectionWithPID("escidoc:3002", "mpiwg:HQ41PZ3H");
|
|
18 //ingestECHOCollection("http://127.0.0.1:18080/echo_nav/echo_pages/content/religion/bulgaria");
|
|
19 //deleteECHOObjects();
|
|
20 //ingestECHOResource("http://127.0.0.1:18080/echo_nav/echo_pages/content/chineseknowledge/china/zhoubisuanjing");
|
|
21 // PrintStream out = new PrintStream(new FileOutputStream("/tmp/out.log"));
|
|
22 //
|
|
23 // System.setErr(out);
|
|
24 //ingestECHOResources();
|
|
25 //
|
|
26
|
|
27 //HashMap<String, String> colls = ie.getPIDsAndEscidocIdsOfCollections(IngestECHO.ECHO_CONTAINER_ID);
|
|
28 //ie.organizeECHOCollections();
|
|
29 //ArrayList<String> urls = ie.findMissingCollections();
|
|
30 //System.out.println(urls);
|
|
31 //ie.findMissingItems();
|
|
32 //ie.ingestECHOResources();
|
|
33 //ie.organizeECHORessources();
|
|
34 // ie.addVersionPid("/ir/item/escidoc:26033");
|
|
35 // HttpResponse res = ie.submitAnObject("/ir/item/escidoc:26033", "submit");
|
|
36 // System.out.println(EScidocBasicHandler.convertStreamToString(res.getEntity().getContent()));
|
|
37 // res = ie.releaseAnObject("/ir/item/escidoc:26033", "first release");
|
|
38 // System.out.println(EScidocBasicHandler.convertStreamToString(res.getEntity().getContent()));
|
|
39 //
|
|
40 //ie.ingestECHOResource("http://echo.mpiwg-berlin.mpg.de/content/jesuit/jesuit_sciences/kircher_lucis_1646");
|
|
41 ie.releaseECHORessources();
|
|
42 //ie.deleteAllContentOfCollection(ie.ECHO_CONTAINER_ID);
|
|
43 //String ret= ie.createMPIWGCollection("ECHO-TESTER-ROOT", "dirk", "contains a test from dw's local echo", "escidoc:21400");
|
|
44 //System.out.println("Calls:"+ret);
|
|
45
|
|
46
|
|
47 }
|
|
48
|
|
49 }
|