private static eUtils.eLinkResult GetLinkResults(string id, eUtils.eUtilsServiceSoapClient serv) { eUtils.eLinkRequest req = new eUtils.eLinkRequest(); req.id = new string[]{id}; //req.db = "pubmed"; return serv.run_eLink(req); }
private static eUtils.eSearchResult GetSearchResults(string db, string myQuery, eUtils.eUtilsServiceSoapClient serv, eUtils.eSearchResult searchResult = null) { eUtils.eSearchRequest req = new eUtils.eSearchRequest(); //req.db = "pmc"; req.term = HttpUtility.UrlEncode(myQuery); //req.RetMax = "100000"; req.RetMax = "1000"; req.db = db; req.usehistory = "y"; if (searchResult != null) { int current = (int.Parse(searchResult.RetStart) + int.Parse(searchResult.RetMax)); if (current >= int.Parse(searchResult.Count)) return null; req.RetStart = current.ToString(); req.WebEnv = searchResult.WebEnv; } eUtils.eSearchResult res = serv.run_eSearch(req); req.WebEnv = res.WebEnv; req.QueryKey = res.QueryKey; return res; }