示例#1
0
        // add by zhangqiuyi 获取世界专利指定类型引证文献信息
        public string GetEnCitedWithSrepPhase(string strPubX, string srepPhase, string type)
        {
            string strRefDoc = "";
            string PubNo = UrlParameterCode_DE.DecryptionAll(strPubX);
            try
            {
                ResultDataManagerDataContext db = new ResultDataManagerDataContext();
                Table<DocdbDocInfo> tbDocDocInfo = db.DocdbDocInfo;

                var result = from item in tbDocDocInfo
                             where item.PubID == PubNo
                             orderby item.ID descending
                             select new xmlDataInfo
                             {
                                 StrTitle = item.Title,
                                 StrApNo = item.AppNo,
                                 StrApDate = item.AppDate,
                                 StrANX = strPubX,
                                 StrIpc = item.IPC.Substring(0, 50),
                                 StrPubNo = item.PubID,
                                 CPIC = item.CPIC.ToString(),
                                 StrSerialNo = item.ID.ToString(),
                             };

                xmlDataInfo resXmlInfo = result.First();

                XmlParser xmlParser = new XmlParser("", "UTF-8");
                DocDBIndexExtract docDBIndexExtract = new DocDBIndexExtract(xmlParser);
                String xmlContent = getEnMainXmlContent(resXmlInfo.StrPubNo);
                if (!xmlContent.Contains("exch:"))
                {
                    docDBIndexExtract.exch = "";
                }

                using (StringReader xmlString = new StringReader(xmlContent))
                {
                    using (XmlReader reader = XmlReader.Create(xmlString, xmlParser.Settings, xmlParser.Context))
                    {
                        XDocument xRoot = XDocument.Load(reader, LoadOptions.None);

                        if (type.Equals("not"))
                            strRefDoc = docDBIndexExtract.getCitedNotContain(xRoot, srepPhase);
                        else
                            strRefDoc = docDBIndexExtract.getCited(xRoot, srepPhase);
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
            }

            if (strRefDoc.Equals(""))
            {
                return "暂无数据";
            }
            return strRefDoc;
        }
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="_item"></param>
        /// <param name="strType"></param>
        /// <returns></returns>
        private bool UpdateByEnXmlFile(xmlDataInfo _item, bool _isDetails)
        {
            bool bRs = false;
            xmlDataInfo item = _item;
            try
            {

                XmlParser xmlParser = new XmlParser("", "UTF-8");
                DocDBIndexExtract docDBIndexExtract = new DocDBIndexExtract(xmlParser);
                String xmlContent = getEnMainXmlContent(item.StrPubNo);
                if (!xmlContent.Contains("exch:"))
                {
                    docDBIndexExtract.exch = "";
                }
                //logger.Debug(xmlContent);
                //xmlContent = Util.StringUtil.ReplaceLowOrderASCIICharacters(xmlContent);
                using (StringReader xmlString = new StringReader(xmlContent))
                {
                    using (XmlReader reader = XmlReader.Create(xmlString, xmlParser.Settings, xmlParser.Context))
                    {
                        XDocument xRoot = XDocument.Load(reader, LoadOptions.None);

                        //item.StrCountryCode = Cpic.Cprs2010.Cfg.DmManager.getCC_Display(docDBIndexExtract.getAppliesCountry(xRoot));

                        if (_isDetails)
                        {
                            item.StrApply = docDBIndexExtract.getAppliesAndCC(xRoot);
                            item.StrInventor = docDBIndexExtract.getInventorsAndCC(xRoot);
                            //item.TongZu = GetTongZu(item.StrPubNo, item.CPIC,1);
                        }
                        else
                        {
                            item.StrApply = docDBIndexExtract.getApplies(xRoot);
                            item.StrInventor = docDBIndexExtract.getInventors(xRoot);
                        }

                        item.StrPubDate = docDBIndexExtract.getPublicDate(xRoot);
                        item.StrFtUrl = getEnFtUrl(item.StrPubDate, item.StrPubNo);

                        /////------------
                        item.StrEpoApNo = docDBIndexExtract.getEpoApplyNo(xRoot);
                        item.StrOriginalApNo = docDBIndexExtract.getOriginalApplyNo(xRoot);
                        item.StrDocdbApNo = docDBIndexExtract.getDocdbApplyNo(xRoot);

                        item.StrDocdbPubNo = docDBIndexExtract.getDocdbPublicDocNo(xRoot);
                        item.StrEpoPubNo = docDBIndexExtract.getEpoPublicDocNo(xRoot);
                        item.StrOriginalPubNo = docDBIndexExtract.getOriginalPublicDocNo(xRoot);
                        //item.StrPubNo = docDBIndexExtract.getPublicDocNo(xRoot);
                        item.StrAbstr = docDBIndexExtract.getAbstract(xRoot);
                        item.StrAbsFmy = docDBIndexExtract.getFmyAbstract(xRoot);
                        item.StrRefDoc = docDBIndexExtract.getCited(xRoot);
                        item.StrPri = docDBIndexExtract.getEpoPriorAndPrd(xRoot);

                        item.StrEcla = docDBIndexExtract.getECLA(xRoot);

                        if (string.IsNullOrEmpty(item.StrTitle.Trim()))
                        {
                            item.StrTitle = docDBIndexExtract.getInventionTitle(xRoot);
                        }
                        if (string.IsNullOrEmpty(item.StrApDate))
                        {
                            item.StrApDate = docDBIndexExtract.getApplyDate(xRoot);
                        }
                    }
                }

                item.StrApDate = XmPatentComm.FormatDateVlue(item.StrApDate);
                item.StrPubDate = item.StrPdOrGd = XmPatentComm.FormatDateVlue(item.StrPubDate);
                item.StrPnOrGn = item.StrPubNo;
                item.StrMainIPC = item.StrIpc.Split(';')[0];
                bRs = true;
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                bRs = false;
            }
            return bRs;
        }