下面是根据某篇SCI论文的WOS获取某篇SCI论文被引用次数[Web of Science 统计]
由于涉及到授权,代码中地址并不是真实地址,仅供学习之用!!
pageEncoding="UTF-8"%>
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
获取某篇SCI论文被引用次数[Web of Science 统计]List uilist = new ArrayList();
String sql = "select top 10 * from Table where ({ fn LENGTH(Field82) } = 19)";
GetConn getCon = new GetConn();
Connection con = getCon.GetConnection();
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(sql);
while(rs.next())
{
String subui = rs.getString("Field82").substring(3, rs.getString("Field82").length());
uilist.add(subui);
}
String ui = "";
/* String ui = (String) request.getAttribute("ui");
if (ui != null && !"".equals(ui) && ui.length() == 19)
{
ui = ui.substring(3, ui.length()); */
%>
for(int i=0;i
ui = uilist.get(i);
System.out.println(ui);
%>
SCI引用频次:
StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("timesCited");
sb.append("citingArticlesURL");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("" + ui + "");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
sb.append("");
URL url = new URL("https://xx.xxxxx.com/xx/xxxx");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("Content-Type","text/xml;charset=UTF-8");
conn.setRequestMethod("POST");
conn.setRequestProperty("Charset", "UTF-8");
conn.setRequestProperty("Content-Length",String.valueOf(sb.length()));
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setConnectTimeout(5000);
conn.setDoOutput(true);
OutputStream os = conn.getOutputStream();
os.write(sb.toString().getBytes("UTF-8"));
os.flush();
os.close();
if (conn.getResponseCode() == 200) {
String line = null;
String body = "";
InputStream is = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
body += line;
}
if (body.indexOf("") == -1) {
out.print(" 0");
System.out.println("次数== -1");
} else {
ui = body.substring(
body.indexOf(""),
body.lastIndexOf(""));
String linkstr = body.substring(
body.lastIndexOf("http://"),
body.indexOf("]]>"));
+ "\" target=\"_blank\">" + ui + "
");System.out.println("ui:" + ui);
}
// out.print(body);
conn.disconnect();
}
%>
}
%>