コード例 #1
0
        public override string GetLink(string linkId)
        {
            var item = SearchService.GetArticleByNumber(linkId);

            if (item == null)
            {
                return(string.Empty);
            }

            if (string.IsNullOrEmpty(BaseUrl))
            {
                return(string.Format("/{0}", linkId));
            }

            return(string.Format("{1}/a/{0}", linkId, BaseUrl));
        }
コード例 #2
0
        public string ReExport(string articleNumber)
        {
            try
            {
                //Use the NlmExportService to reExport the NLM feed
                ExportResult result = _nlmExportService.ExportNlm(_searcher.GetArticleByNumber(articleNumber), ExportType.Manual, PublicationType.Ecorrected);

                if (result.ExportSuccessful)
                {
                    return(string.Empty);
                }
                else
                {
                    return(result.Exception.ToString());
                }
            }
            catch (Exception ex)
            {
                Sitecore.Diagnostics.Log.Error("Error while ReExporting Article Nlm: " + ex.ToString(), this.GetType());
                return(ex.ToString());
            }
        }