根据WOS获取某篇SCI论文被引用次数[Web of Science 统计]


下面是根据某篇SCI论文的WOS<span style="font-family: Arial, Helvetica, sans-serif;">获取某篇SCI论文被引用次数[Web of Science 统计]</span>
<span style="font-family:Arial, Helvetica, sans-serif;">由于涉及到授权</span><span style="font-family: Arial, Helvetica, sans-serif;">,代码中地址并不是真实地址,仅供学习之用!!</span>

<%@ page language="java" import="java.util.*,java.io.*,java.net.HttpURLConnection,java.net.URL,java.net.*,database.*,java.sql.*"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>获取某篇SCI论文被引用次数[Web of Science 统计]</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="引用次数">
<meta http-equiv="description" content="获取某篇SCI论文被引用次数[Web of Science 统计]">

</head>

<body>
	<%
		List<String> uilist = new ArrayList<String>();
		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()); */
	%>
	<table>
		<%
			for(int i=0;i<uilist.size();i++){
				ui = uilist.get(i);
				System.out.println(ui);
		%>
		
		<tr>
			<td height="30" align="left">
				<span class="blue_title">SCI引用频次:</span>
				<span class="blue_text"> 
				<%
					StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"utf-8\"  ?>");
					
						sb.append("<request xmlns=\"http://www.xxxx.com/xxxx\">");
						sb.append("<fn name=\"LinksAMR.retrieve\">");
						sb.append("<list>");
						sb.append("<map>");
						sb.append("</map>");
						sb.append("<map>");
						sb.append("<list name=\"WOS\">");
						sb.append("<val>timesCited</val>");
						sb.append("<val>citingArticlesURL</val>");
						sb.append("</list>");
						sb.append("</map>");
						sb.append("<map>");
						sb.append("<map name=\"cite_1\">");
						sb.append("<val name=\"ut\">" + ui + "</val>");
						sb.append("</map>");
						sb.append("</map>");
						sb.append("</list>");
						sb.append("</fn>");
						sb.append("</request>");

						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("<val name=\"timesCited\">") == -1) {
								out.print(" 0");
								System.out.println("次数== -1");
							} else {
								ui = body.substring(
										body.indexOf("<val name=\"timesCited\">"),
										body.lastIndexOf("</val>"));
								String linkstr = body.substring(
										body.lastIndexOf("http://"),
										body.indexOf("]]>"));
								out.print(" <a href=\"" + linkstr
										+ "\" target=\"_blank\">" + ui + "</a>");
										
									System.out.println("ui:" + ui);
							}
// 							out.print(body);
							conn.disconnect();
						}
				%> 
				</span>
			</td>
		</tr>
		<%
			}
		%>

	</table>
</body>
</html>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值