Changeset 31358
- Timestamp:
- 2017-01-25T00:04:07+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/vol-checker/src/org/hathitrust/extractedfeatures/VolumeCheck.java
r31357 r31358 112 112 113 113 if ((line_num % 100000) == 0) { 114 //System.err.println("sample id = " + id);115 //System.err.println("Passed line: " + line_num);116 114 System.err.print("."); 117 115 } … … 165 163 Process proc = runtime.exec(rsync_command); 166 164 proc.waitFor(); 167 //System.err.println("*** Rsync finished");168 165 169 166 FileInputStream fis = new FileInputStream(json_filename_tail); … … 179 176 } 180 177 181 protected void doCollectionToWorkset(HttpServletResponse response, String c, String a, String format) throws IOException 178 protected void doCollectionToWorkset(HttpServletResponse response, String col_title, 179 String c, String a, String format) throws IOException 182 180 { 183 181 String post_url_params = "c="+c+"&a="+a+"&format="+format; … … 231 229 ci++; 232 230 } 233 231 232 String col_title_filename = col_title + ".txt"; 234 233 response.setContentType("text/plain"); 234 response.setHeader("Content-Disposition", "attachment; filename=\"" + col_title_filename + "\""); 235 235 236 PrintWriter pw = response.getWriter(); 236 237 pw.append(workset_friendly_sb.toString()); … … 253 254 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 254 255 { 255 256 257 256 String cgi_ids = request.getParameter("ids"); 258 257 String cgi_id = request.getParameter("id"); … … 332 331 } 333 332 else if (cgi_convert_col != null) { 334 // c=464226859&a=download&format=text335 //String cgi_c = request.getParameter("c");333 334 String cgi_col_title = request.getParameter("col-title"); 336 335 String cgi_a = request.getParameter("a"); 337 336 String cgi_format = request.getParameter("format"); … … 341 340 } 342 341 else { 343 doCollectionToWorkset(response,cgi_convert_col,cgi_a,cgi_format); 342 if (cgi_col_title == null) { 343 cgi_col_title = "htrc-workset-" + cgi_convert_col; 344 } 345 346 doCollectionToWorkset(response,cgi_col_title,cgi_convert_col,cgi_a,cgi_format); 344 347 } 345 348
Note:
See TracChangeset
for help on using the changeset viewer.