-
Notifications
You must be signed in to change notification settings - Fork 0
/
pc.jsp.backup
142 lines (124 loc) · 3.88 KB
/
pc.jsp.backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<%@ page import="java.util.*" %>
<jsp:useBean id="PubCloudGenerator" class="org.icapture.tag.PubMed.PubMedCloudGeneratorBean" scope="session" />
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {background-color:#55FF55;}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.9em;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
.key_title {font-size: 0.8em;}
.key {font-size: 0.8em;
color: blue;
font-style: bold;
font-weight: bolder; }
a.tag_cloud_frequency_0 { font-size: 5px }
a.tag_cloud_frequency_1 { font-size: 6px }
a.tag_cloud_frequency_2 { font-size: 7px }
a.tag_cloud_frequency_3 { font-size: 8px }
a.tag_cloud_frequency_4 { font-size: 9px }
a.tag_cloud_frequency_5 { font-size: 10px }
a.tag_cloud_frequency_6 { font-size: 11px }
a.tag_cloud_frequency_7 { font-size: 12px }
a.tag_cloud_frequency_8 { font-size: 13px }
a.tag_cloud_frequency_9 { font-size: 14px }
a.tag_cloud_frequency_10 { font-size: 15px }
a.tag_cloud_recency_0 { color: #5B7884 }
a.tag_cloud_recency_1 { color: #5B7884 }
a.tag_cloud_recency_2 { color: #94AAB5 }
a.tag_cloud_recency_3 { color: #94AAB5 }
a.tag_cloud_recency_4 { color: #C0B0C4 }
a.tag_cloud_recency_5 { color: #C0B0C4 }
a.tag_cloud_recency_6 { color: #C0B0C4 }
a.tag_cloud_recency_7 { color: #FF8499 }
a.tag_cloud_recency_8 { color: #FF8499 }
a.tag_cloud_recency_9 { color: #EA1A29 }
a.tag_cloud_recency_10 { color: #EA1A29 }
--></style>
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return ""
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
function checkCookie()
{
username=getCookie('username')
if (username!=null && username!="")
{
alert('Welcome again '+username+'!')
}
else
{
username=prompt('Please enter your name:',"")
if (username!=null && username!="")
{
setCookie('username',username,365)
}
}
}
</script>
</HEAD>
<BODY onLoad="checkCookie()">
<FONT color="blue"><B>iPubCloud</B></FONT><BR>
<FORM method="GET" action="http://bioinfo.icapture.ubc.ca:8090/PubCloud/pc.jsp">
Query: <INPUT TYPE="text" NAME="query" SIZE="13">
<INPUT TYPE="submit" VALUE="Get Cloud">
</FORM>
<%
String query = request.getParameter("query");
String startYear = "";
String endYear = "";
String type = "abstract";
String option = "most_recent";
int optionValue = 100;
int recentValue = 100;
if (query == null) {
//out.println("Await keyword search!");
}
else if (query == "") {
out.println("<FONT COLOR=\"red\"><B>ERROR:</B> You have not entered a PubMed query</FONT><BR>");
}
else {
out.println("Query: <SPAN class=\"key\">" + query + "</SPAN><br><br>");
boolean checkCloud = PubCloudGenerator.mainBuildCloud(query, startYear, endYear, type, option, optionValue);
String idListHtml = PubCloudGenerator.getPMIDListHtml();
String cloudHTML = "";
if (checkCloud) {
cloudHTML = PubCloudGenerator.generateHtmlCloud_iGoogle();
}
else {
cloudHTML = "<FONT color=\"red\">Number of articles exceeds maximum allowed!</FONT><BR>\n";
}
out.println( "<CENTER>\n" + cloudHTML + "\n</CENTER>\n");
}
%>
</BODY>
</HTML>