annotate src/main/java/de/mpiwg/gazetteer/utils/FileManager.java @ 40:35ed4e650a53

bug fixed: full text search when section not found in section_index table. add paginator
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 07 Dec 2015 17:06:57 +0100
parents 37840afb7b80
children 7c2e1b14b77d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
1 package de.mpiwg.gazetteer.utils;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
2
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
3 import java.io.File;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
4 import java.io.IOException;
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
5 import java.io.PrintWriter;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
6 import java.nio.file.Files;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
7 import java.nio.file.Paths;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
8 import java.text.DateFormat;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
9 import java.text.SimpleDateFormat;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
10 import java.util.Date;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
11 import java.util.List;
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
12
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
13 import org.apache.commons.lang.StringUtils;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
14 import org.apache.log4j.Logger;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
15
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
16 import de.mpiwg.gazetteer.bo.LGBranch;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
17 import de.mpiwg.gazetteer.bo.LGFile;
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
18 import de.mpiwg.gazetteer.bo.LGFullTextSearchFile;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
19 import de.mpiwg.gazetteer.db.DBBook;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
20 import de.mpiwg.gazetteer.db.DBContents;
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
21
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
22 public class FileManager {
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
23
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
24 private static Logger logger = Logger.getLogger(FileManager.class);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
25
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
26 private static DateFormat dfmt = new SimpleDateFormat( "yyyy.MM.dd_hh.mm.ss.SSS" );
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
27
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
28
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
29
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
30 private static String getRootPath() throws Exception{
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
31 String base = PropertiesUtils.getPropValue("files_root");
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
32
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
33 if(StringUtils.isEmpty(base)){
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
34 throw new Exception("Property files_root no found. The files can be stored without this property.");
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
35 }
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
36
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
37 if(!base.endsWith("/")){
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
38 base += "/";
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
39 }
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
40
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
41 logger.info("files_root=" + base);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
42
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
43 return base;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
44 }
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
45
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
46
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
47 public static void saveFullTextSearchFileAsCsv(LGFullTextSearchFile file, Long userId, List<DBContents> list) throws Exception{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
48
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
49 // String absolutePath = PropertiesUtils.getPropValue("ftsearch_root") + "/csv/" + userId.toString() + "/";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
50 String absolutePath = PropertiesUtils.getPropValue("lgmap_datasets") + "/";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
51
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
52 String fileName = file.getUserId() + "_" + file.getFileName() + ".csv";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
53
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
54 File folder = new File(absolutePath);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
55 folder.mkdirs();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
56
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
57 logger.info("Trying to save file " + absolutePath + fileName + ".");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
58
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
59 PrintWriter out = new PrintWriter(absolutePath + fileName);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
60
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
61 String text = new String(); // make it from list
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
62 text += "Address,LEVEL1,LEVEL2,Name,PERIOD,TimeSpan:begin,TimeSpan:end,Longitude,Latitude,PAGE,SECTION,CONTENT,BOOK_ID,Description\n";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
63
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
64 for (DBContents c : list) {
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
65
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
66 if (c.getSection() != null && !c.isRemoved()){
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
67
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
68 DBBook book = c.getSection().getBook();
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
69
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
70 String description = book.getVolume() + "/" + book.getAuthor() + "/" + book.getEdition();
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
71
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
72 text += c.getCoordinatesBook().getPlace_name() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
73 book.getLevel1() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
74 book.getLevel2() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
75 book.getName() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
76 book.getPeriod() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
77 book.getStart_year() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
78 book.getEnd_year() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
79 c.getCoordinatesBook().getX() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
80 c.getCoordinatesBook().getY() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
81 c.getPage() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
82 c.getSection().getName() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
83 c.getContent() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
84 c.getBookId() + "," +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
85 description + "\n";
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
86 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
87 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
88
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
89 text = text.substring(0, text.length()-2); // cut the last 2 chars, which are "\n" here
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
90
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
91 out.println(text);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
92 out.close();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
93
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
94 logger.info("The file " + fileName + " has been saved correctly.");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
95
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
96
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
97 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
98
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
99
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
100 private static String getLGMapUrl(LGFullTextSearchFile file) throws IOException{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
101 String lgmap = PropertiesUtils.getPropValue("lgmap") + "&file=" + file.getUserId().toString() + "_" + file.getFileName() + ".csv&name=" + file.getSearchTerms();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
102
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
103 return lgmap;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
104 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
105
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
106 public static void saveFullTextSearchFileAsHtml(LGFullTextSearchFile file, Long userId, List<DBContents> list) throws Exception{
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
107
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
108 String absolutePath = PropertiesUtils.getPropValue("ftsearch_root") + "/html/" + userId.toString() + "/";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
109 String fileName = file.getFileName() + ".html";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
110
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
111 File folder = new File(absolutePath);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
112 folder.mkdirs();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
113
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
114 logger.info("Trying to save file " + absolutePath + fileName + ".");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
115
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
116 PrintWriter out = new PrintWriter(absolutePath + fileName);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
117
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
118 String text = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
119 String header = new String();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
120 text += "<html>";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
121
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
122 String root_server = PropertiesUtils.getPropValue("root_server");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
123
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
124 header = "<head>" +
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
125 "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>" +
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
126
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
127 "<link href='" + root_server + "/resources/css/style.css' type='text/css' rel='stylesheet'/>" +
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
128 "<script src='" + root_server + "/resources/js/jquery.min.js' type='text/javascript'></script>" +
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
129 "<script src='" + root_server + "/resources/js/LGSearch.js' type='text/javascript'></script>" +
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
130
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
131 "</head>";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
132
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
133 text += header;
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
134 text += "<body>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
135 + "<div class='subTitel'>Table name: " + file.getFileName() + "<div>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
136 + "<div class='label'>" + list.size() + " result(s) in the table.</dvi>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
137 + "<div class='label'>searching by keywords (possibly with filters): " + '"' + "<span id='searchTerm'>" + file.getSearchTerms() + "</span>" + '"' + "</div>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
138 + "<div class='label'><a href='" + getLGMapUrl(file) + "' target='_blank'>view on LGMap</a><div>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
139 + "<br>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
140 + "<table class='pageTable'>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
141 + "<tr>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
142 + "<td class='tableTitle'>#</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
143 + "<td class='tableTitle'>book id</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
144 + "<td class='tableTitle'>book name</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
145 + "<td class='tableTitle'>level1</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
146 + "<td class='tableTitle'>level2</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
147 + "<td class='tableTitle'>period</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
148 + "<td class='tableTitle'>section name</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
149 + "<td class='tableTitle'>page</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
150 + "<td class='tableTitle'>content</td>"
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
151 + "<tr>";
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
152 for (DBContents c : list) {
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
153
40
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
154 if ( c.getSection() != null && !c.isRemoved()){
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
155
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
156 DBBook book = c.getSection().getBook();
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
157
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
158 text += "<tr>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
159 "<td>" + c.getInx() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
160 "<td>" + c.getBookId() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
161 "<td>" + book.getName() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
162 "<td>" + book.getLevel1() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
163 "<td>" + book.getLevel2() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
164 "<td>" + book.getPeriod() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
165 "<td>" + c.getSection().getName() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
166 "<td>" + c.getPage() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
167 "<td class='content'>" + c.getContent() + "</td>" +
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
168 "</tr>";
35ed4e650a53 bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 39
diff changeset
169 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
170 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
171
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
172 text += "</table></body></html>";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
173
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
174 out.println(text);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
175 out.close();
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
176
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
177 logger.info("The file " + fileName + " has been saved correctly.");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
178
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
179
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
180 }
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
181
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
182
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
183
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
184 public static String saveFile(LGBranch branch, LGFile file, Date date, Long userId) throws Exception{
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
185
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
186 String absolutePath = getRootPath() + branch.getSectionId() + "/";
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
187 String fileName =
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
188 branch.getSectionId() + "_" +
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
189 branch.getId() + "_" +
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
190 file.getId() + "_" +
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
191 dfmt.format(date) + "_" +
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
192 userId +
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
193 ".txt";
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
194
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
195 File folder = new File(absolutePath);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
196 folder.mkdirs();
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
197
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
198 logger.info("Trying to save file " + absolutePath + fileName + ".");
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
199
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
200 PrintWriter out = new PrintWriter(absolutePath + fileName);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
201 out.println(file.getContent());
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
202 out.close();
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
203
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
204 logger.info("The file " + fileName + " has been saved correctly.");
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
205 return fileName;
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
206 }
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
207
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
208 public static String getFileAsText(LGFile file) throws Exception{
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
209
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
210 LGBranch branch = DataProvider.getInstance().getBranch(file.getBranchId());
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
211
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
212 String absolutePath = getRootPath() + branch.getSectionId() + "/" + file.getFileName();
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
213 System.out.println("Loading: " + absolutePath);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
214 byte[] encoded = Files.readAllBytes(Paths.get(absolutePath));
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
215 return new String(encoded, "UTF8");
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
216 }
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
217
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
218 public static File getFileAsFile(LGFile file) throws Exception{
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
219
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
220 LGBranch branch = DataProvider.getInstance().getBranch(file.getBranchId());
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
221
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
222 String absolutePath = getRootPath() + branch.getSectionId() + "/" + file.getFileName();
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
223 System.out.println("Loading: " + absolutePath);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
224 return new File(absolutePath);
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
225 }
39
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
226
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
227
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
228 public static String getFullTextSearchHtmlFileText(LGFullTextSearchFile file) throws Exception {
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
229
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
230 String absolutePath = PropertiesUtils.getPropValue("ftsearch_root") + "/html/" + file.getUserId().toString() + "/" + file.getFileName() + ".html";
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
231 System.out.println("Loading: " + absolutePath);
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
232
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
233 byte[] encoded = Files.readAllBytes(Paths.get(absolutePath));
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
234 return new String(encoded, "UTF8");
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
235
37840afb7b80 new: full text search
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 0
diff changeset
236 }
0
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
237
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
238
3e62083dbcbf First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
"jurzua <jurzua@mpiwg-berlin.mpg.de>"
parents:
diff changeset
239 }