Project

General

Profile

« Previous | Next » 

Revision 50582

fixed 'next' method of the iterator class and added new field entityPath

View differences:

RestCollectorPluginTest.java
23 23
	private String baseUrl = "https://share.osf.io/api/v2/search/creativeworks/_search";
24 24
	private String resumptionType = "count";
25 25
	private String resumptionParam = "from";
26
	private String resumptionXpath = "";
26
	private String entityXpath = "//hits/hits";
27
	private String resumptionXpath = "//hits";
27 28
	private String resultTotalXpath = "//hits/total";
28 29
	private String resultFormatParam = "format";
29 30
	private String resultFormatValue = "json";
30 31
	private String resultSizeParam = "size";
31
	private String query = "q=%28sources%3ASocArXiv+AND+type%3Apreprint%29";
32

  
32
	// private String query = "q=%28sources%3ASocArXiv+AND+type%3Apreprint%29";
33
	private String query = "q=%28sources%3AengrXiv+AND+type%3Apreprint%29";
34
    // private String query = "=(sources:engrXiv AND type:preprint)";
35
    
33 36
	private String protocolDescriptor = "rest_json2xml"; 
34 37
	private InterfaceDescriptor ifDesc = new InterfaceDescriptor();
35 38
	private RestCollectorPlugin rcp;
......
45 48
		params.put("resultFormatValue", resultFormatValue);
46 49
		params.put("resultSizeParam", resultSizeParam);
47 50
		params.put("queryParams", query);
51
		params.put("entityXpath", entityXpath);
48 52
		
49 53
		ifDesc.setBaseUrl(baseUrl);
50 54
		ifDesc.setParams(params);
......
64 68
			Assert.assertTrue(s.length() > 0);
65 69
			i++;
66 70
			System.out.println(s);
67
			break;
71
			if (i > 200)
72
				break;
68 73
		}
74
		System.out.println(i);
69 75
		Assert.assertTrue(i > 0);
70 76
	}
71 77
}

Also available in: Unified diff