Mercurial > hg > LGServices
comparison src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java @ 49:7c2e1b14b77d
new: load existing full text searching result into searching table
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 26 Jan 2016 11:46:10 +0100 |
parents | 13555aff1f88 |
children | a00efd5d9e77 |
comparison
equal
deleted
inserted
replaced
48:13555aff1f88 | 49:7c2e1b14b77d |
---|---|
293 } | 293 } |
294 | 294 |
295 return list; | 295 return list; |
296 } | 296 } |
297 | 297 |
298 | |
298 public LGFullTextSearchFile saveLGFullTextSearchFile(List<DBContents> list, Long userId, LGFullTextSearchFile searchFile) throws Exception { | 299 public LGFullTextSearchFile saveLGFullTextSearchFile(List<DBContents> list, Long userId, LGFullTextSearchFile searchFile) throws Exception { |
299 // save as csv and html file in filesystem, and records in db `FullTextSearchFile | 300 // save as csv and html file in filesystem, and records in db `FullTextSearchFile |
300 // List<DBContents> list is the filteredList of searching result | 301 // List<DBContents> list is the filteredList of searching result with isRemoved field |
301 | 302 |
302 Date date = new Date(); | 303 Date date = new Date(); |
303 | 304 |
304 //Saving into DB | 305 //Saving into DB |
305 //################################## | 306 //################################## |
308 | 309 |
309 DBService.saveDBEntry0(session, searchFile, date); | 310 DBService.saveDBEntry0(session, searchFile, date); |
310 | 311 |
311 //Saving physical file in the operating system | 312 //Saving physical file in the operating system |
312 FileManager.saveFullTextSearchFileAsCsv(searchFile, userId, list); // save csv file to LGMap's datasets folder | 313 FileManager.saveFullTextSearchFileAsCsv(searchFile, userId, list); // save csv file to LGMap's datasets folder |
313 FileManager.saveFullTextSearchFileAsHtml(searchFile, userId, list); // save html file to ftsearch-data folder | 314 FileManager.saveFullTextSearchFileAsHtml(searchFile, userId, list); // save html file to LGMap's datasets folder |
314 | 315 |
315 session.getTransaction().commit(); | 316 session.getTransaction().commit(); |
316 //################################## | 317 //################################## |
317 | 318 |
318 return searchFile; | 319 return searchFile; |
319 } | 320 } |