Ejemplo n.º 1
0
        public List <BO.ORCID.PersonWork> GetForORCIDUpdate(ProfilesRNSDLL.BO.ORCID.Person orcidPerson, long subject, string sessionID)
        {
            const string WORK_TYPE = "journal-article";

            List <BO.ORCID.PersonWork> pubs = new List <BO.ORCID.PersonWork>();

            ProfilesRNSDLL.BO.ORCID.REFDecision visibilityForPublications = GetPublicationVisibility(subject);

            foreach (System.Data.DataRow dr in base.GetPublications(subject, sessionID).Table.Rows)
            {
                BO.ORCID.PersonWork pub = new BO.ORCID.PersonWork();
                if (!dr.IsNull("prns_informationResourceReference"))
                {
                    pub.WorkCitation = dr["prns_informationResourceReference"].ToString();
                }
                if (!dr.IsNull("prns_publicationDate"))
                {
                    pub.PubDate = DateTime.Parse(dr["prns_publicationDate"].ToString());
                }
                if (!dr.IsNull("EntityID"))
                {
                    pub.PubID = dr["EntityID"].ToString();
                }
                if (!dr.IsNull("bibo_pmid") && dr["bibo_pmid"].ToString().Trim().Equals(string.Empty))
                {
                    pub.PMID = int.Parse(dr["bibo_pmid"].ToString());
                    pub.DOI  = ProfilesRNSDLL.BLL.ORCID.DOI.Get(pub.PMID.ToString());
                    AddIdentifier(pub, ProfilesRNSDLL.BO.ORCID.REFWorkExternalType.REFWorkExternalTypes.pmid, pub.PMID.ToString());
                }
                else
                {
                    pub.DOI = GetDOI(pub, "http://dx.doi.org/");
                }
                if (pub.DOI != ProfilesRNSDLL.BLL.ORCID.DOI.DOI_NOT_FOUND_MESSAGE)
                {
                    AddIdentifier(pub, ProfilesRNSDLL.BO.ORCID.REFWorkExternalType.REFWorkExternalTypes.doi, pub.DOI);
                }

                if (!dr.IsNull("URL"))
                {
                    pub.URL = dr["URL"].ToString();
                }
                if (!dr.IsNull("rdfs_label"))
                {
                    pub.WorkTitle = dr["rdfs_label"].ToString();
                }
                if (visibilityForPublications.Exists)
                {
                    pub.DecisionID = visibilityForPublications.DecisionID;
                }
                pub.WorkType = WORK_TYPE;
                pubs.Add(pub);
            }

            // Get the list of processed pubs
            List <ProfilesRNSDLL.BO.ORCID.PersonWork> processedWorks = GetSuccessfullyProcessedWorks(orcidPerson.PersonID);

            // Get the pubmed pubs that haven't been processed.
            return((from p in pubs where !processedWorks.Any(pa => pa.PubID == p.PubID) select p).ToList());
        }
Ejemplo n.º 2
0
 public bool Save(BO.ORCID.PersonWork bo)
 {
     if (bo.Exists)
     {
         return(base.Edit(bo));
     }
     else
     {
         return(base.Add(bo));
     }
 }
Ejemplo n.º 3
0
 private bool Save(BO.ORCID.PersonWork bo, System.Data.Common.DbTransaction trans)
 {
     if (bo.Exists)
     {
         return(base.Edit(bo, trans));
     }
     else
     {
         return(base.Add(bo, trans));
     }
 }
Ejemplo n.º 4
0
        public List<BO.ORCID.PersonWork> GetForORCIDUpdate(ProfilesRNSDLL.BO.ORCID.Person orcidPerson, long subject, string sessionID)
        {
            const string WORK_TYPE = "journal-article";

            List<BO.ORCID.PersonWork> pubs = new List<BO.ORCID.PersonWork>();

            ProfilesRNSDLL.BO.ORCID.REFDecision visibilityForPublications = GetPublicationVisibility(subject);

            foreach (System.Data.DataRow dr in base.GetPublications(subject, sessionID).Table.Rows)
            {

                BO.ORCID.PersonWork pub = new BO.ORCID.PersonWork();
                if (!dr.IsNull("prns_informationResourceReference"))
                {
                    pub.WorkCitation = dr["prns_informationResourceReference"].ToString();
                }
                if (!dr.IsNull("prns_publicationDate"))
                {
                    pub.PubDate = DateTime.Parse(dr["prns_publicationDate"].ToString());
                }
                if (!dr.IsNull("EntityID"))
                {
                    pub.PubID = dr["EntityID"].ToString();
                }
                if (!dr.IsNull("bibo_pmid") && !dr["bibo_pmid"].ToString().Trim().Equals(string.Empty))
                {
                    pub.PMID = int.Parse(dr["bibo_pmid"].ToString());
                    pub.DOI = ProfilesRNSDLL.BLL.ORCID.DOI.Get(pub.PMID.ToString());
                    AddIdentifier(pub, ProfilesRNSDLL.BO.ORCID.REFWorkExternalType.REFWorkExternalTypes.pmid, pub.PMID.ToString());
                }
                else
                {
                    pub.DOI = GetDOI(pub, "http://dx.doi.org/");
                }
                if (pub.DOI != ProfilesRNSDLL.BLL.ORCID.DOI.DOI_NOT_FOUND_MESSAGE)
                {
                    AddIdentifier(pub, ProfilesRNSDLL.BO.ORCID.REFWorkExternalType.REFWorkExternalTypes.doi, pub.DOI);
                }

                if (!dr.IsNull("URL"))
                {
                    pub.URL = dr["URL"].ToString();
                }
                if (!dr.IsNull("rdfs_label"))
                {
                    pub.WorkTitle = dr["rdfs_label"].ToString();
                }
                if (visibilityForPublications.Exists)
                {
                    pub.DecisionID = visibilityForPublications.DecisionID;
                }
                pub.WorkType = WORK_TYPE;
                pubs.Add(pub);
            }

            // Get the list of processed pubs
            List<ProfilesRNSDLL.BO.ORCID.PersonWork> processedWorks = GetSuccessfullyProcessedWorks(orcidPerson.PersonID);

            // Get the pubmed pubs that haven't been processed.
            return (from p in pubs where !processedWorks.Any(pa => pa.PubID == p.PubID) select p).ToList();
        }