Skip to content

Commit

Permalink
Merge pull request #388 from Rothamsted/20190722_mdjuly2019
Browse files Browse the repository at this point in the history
fixes to #371 #374 #311
  • Loading branch information
AjitPS authored Jul 31, 2019
2 parents 21a5820 + 71720b1 commit 00aef32
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
5 changes: 4 additions & 1 deletion common/client-base/src/main/webapp/html/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ table.tablesorter thead tr .header {
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
position: sticky;
top: 0;
z-index: 999;
}
table.tablesorter tbody td {
color:#3D3D3D;
Expand Down Expand Up @@ -912,4 +915,4 @@ a.contact-button :hover {

#genemap {
height: 620px;/*450px;*/
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<%
// added to overcome double quotes issue
String keywords = request.getParameter("keyword");
keywords = keywords.replaceAll("^\"|\"$", "###");
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://knetminer.rothamsted.ac.uk/KnetMaps/dist/css/knetmaps.css"/>
Expand All @@ -17,7 +22,7 @@
},
dataType: "json",
data: JSON.stringify({
keyword: "${keyword}",
keyword: "<%=keywords%>",
list: ${list}
})
}).success(function (data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<%
// added to overcome double quotes issue
String keywords = request.getParameter("keyword");
keywords = keywords.replaceAll("^\"|\"$", "###");
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://knetminer.rothamsted.ac.uk/KnetMaps/dist/css/knetmaps.css"/>
Expand All @@ -17,7 +22,7 @@
},
dataType: "json",
data: JSON.stringify({
keyword: "${keyword}",
keyword: "<%=keywords%>",
list: ${list}
})
}).success(function (data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,12 @@ public HashMap<ONDEXConcept, Float> searchLucene(String keywords, Collection<OND

String keyword = keywords;

//added to overcome double quotes issue
//if changing this, need to change genepage.jsp and evidencepage.jsp
keyword = keyword.replaceAll("^###|###$", "\"");
log.debug("Keyword is:"+ keyword);


// creates the NOT list (list of all the forbidden documents)
String NOTQuery = createsNotList(keyword);
String crossTypesNotQuery = "";
Expand Down Expand Up @@ -1349,12 +1355,12 @@ public int compare(String o1, String o2) {
}
//For each conceptName of the update list deletes and creates a new conceptName
for (String ntc : namesToCreate.keySet()) {
if (!ntc.contains("</span>")) {
// if (!ntc.contains("</span>")) {
String newName = p.matcher(ntc).replaceAll(highlighter);
boolean isPref = namesToCreate.get(ntc);
concept.deleteConceptName(ntc);
concept.createConceptName(newName, isPref);
}
// }
}

// search in concept attributes
Expand Down Expand Up @@ -1402,6 +1408,11 @@ public ONDEXGraph findSemanticMotifs(Set<ONDEXConcept> seed, String keyword) {
Set<ONDEXConcept> keywordConcepts = new HashSet<ONDEXConcept>();
Set<EvidencePathNode> pathSet = new HashSet<EvidencePathNode>();


//added to overcome double quotes issue
//if changing this, need to change genepage.jsp and evidencepage.jsp
keyword = keyword.replaceAll("^###|###$", "\"");

log.info("Keyword is: " + keyword);
Set<String> keywords = "".equals(keyword) ? Collections.EMPTY_SET : this.parseKeywordIntoSetOfWords(keyword);
Map<String, String> keywordColourMap = new HashMap<String, String>();
Expand Down

0 comments on commit 00aef32

Please sign in to comment.