Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Lingnau committed Jan 30, 2019
1 parent 7b69d34 commit 4e1af69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/de/cses/client/ornamentic/OrnamenticFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ public SafeHtml render(OrnamentClassEntry item) {
ContentPanel remarksPanel = new ContentPanel();
remarksPanel.setHeaderVisible(true);
remarksPanel.setToolTip(Util.createToolTip("Search for ornament remarks."));
remarksPanel.setHeading("Ornament Refmarks");
remarksPanel.setHeading("Ornament Remarks");
remarksPanel.add(ornamentRemarksSearchTF);
ornamenticFilterVLC.add(remarksPanel);

Expand Down
10 changes: 6 additions & 4 deletions src/de/cses/server/mysql/MysqlConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -1852,11 +1852,11 @@ public ArrayList<AnnotatedBibliographyEntry> searchAnnotatedBibliography(Annotat
String editorTerm = "";
for (String name : searchEntry.getAuthorSearch().split("\\s+")) {
authorTerm += authorTerm.isEmpty()
? "SELECT BibID FROM AuthorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?)))"
: " INTERSECT SELECT BibID FROM AuthorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?)))";
? "SELECT BibID FROM AuthorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?) OR (Alias LIKE ?)))"
: " INTERSECT SELECT BibID FROM AuthorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?) OR (Alias LIKE ?)))";
editorTerm += editorTerm.isEmpty()
? "SELECT BibID FROM EditorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?)))"
: " INTERSECT SELECT BibID FROM EditorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?)))";
? "SELECT BibID FROM EditorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?) OR (Alias LIKE ?)))"
: " INTERSECT SELECT BibID FROM EditorBibliographyRelation WHERE (AuthorID IN (SELECT DISTINCT AuthorID FROM Authors WHERE (FirstName LIKE ?) OR (LastName LIKE ?) OR (Institution LIKE ?) OR (Alias LIKE ?)))";
}
where = "BibID IN (" + authorTerm + ") OR BibID IN (" + editorTerm + ")";
}
Expand Down Expand Up @@ -1901,11 +1901,13 @@ public ArrayList<AnnotatedBibliographyEntry> searchAnnotatedBibliography(Annotat
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
}
for (String name : searchEntry.getAuthorSearch().split("\\s+")) {
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
pstmt.setString(i++, "%" + name + "%");
}
}
if (searchEntry.getPublisherSearch() != null && !searchEntry.getPublisherSearch().isEmpty()) {
Expand Down

0 comments on commit 4e1af69

Please sign in to comment.