private void DrawProfilesModule() { DateTime d = DateTime.Now; Profiles.Profile.Modules.CustomViewAuthorInAuthorship.DataIO data = new Profiles.Profile.Modules.CustomViewAuthorInAuthorship.DataIO(); List <Publication> publication = new List <Publication>(); Utilities.DataIO.ClassType type = Utilities.DataIO.ClassType.Unknown; Framework.Utilities.Namespace xmlnamespace = new Profiles.Framework.Utilities.Namespace(); XmlNamespaceManager namespaces = xmlnamespace.LoadNamespaces(BaseData); if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Person']", namespaces) != null) { type = Utilities.DataIO.ClassType.Person; } if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Group']", namespaces) != null) { type = Utilities.DataIO.ClassType.Group; } using (SqlDataReader reader = data.GetPublications(base.RDFTriple, type)) { while (reader.Read()) { publication.Add(new Publication(reader["bibo_pmid"].ToString(), reader["vivo_pmcid"].ToString(), reader["prns_informationResourceReference"].ToString(), reader["vivo_webpage"].ToString(), Convert.ToInt32(reader["PMCCitations"]), reader["Fields"].ToString(), Convert.ToInt32(reader["TranslationHumans"]), Convert.ToInt32(reader["TranslationAnimals"]), Convert.ToInt32(reader["TranslationCells"]), Convert.ToInt32(reader["TranslationPublicHealth"]), Convert.ToInt32(reader["TranslationClinicalTrial"]))); } rpPublication.DataSource = publication; rpPublication.DataBind(); } // Get timeline bar chart string storedproc = "[Profile.Module].[NetworkAuthorshipTimeline.Person.GetData]"; if (type == Utilities.DataIO.ClassType.Group) { storedproc = "[Profile.Module].[NetworkAuthorshipTimeline.Group.GetData]"; } using (SqlDataReader reader = data.GetGoogleTimeline(base.RDFTriple, storedproc)) { while (reader.Read()) { timelineBar.Src = reader["gc"].ToString(); timelineBar.Alt = reader["alt"].ToString(); litTimelineTable.Text = reader["asText"].ToString(); } reader.Close(); } if (timelineBar.Src == "") { timelineBar.Visible = false; } // Login link loginLiteral.Text = String.Format("<a href='{0}'>login</a>", Root.Domain + "/login/default.aspx?pin=send&method=login&edit=true"); if (type == Utilities.DataIO.ClassType.Group) { divPubHeaderText.Visible = false; } Framework.Utilities.DebugLogging.Log("PUBLICATION MODULE end Milliseconds:" + (DateTime.Now - d).TotalSeconds); }
private void DrawProfilesModule() { DataIO.PublicationsType pt; if (base.Context.Request.RawUrl.Contains("Publications=All")) { pt = DataIO.PublicationsType.All; aAllPubs.HRef = ""; aAllPubs.Attributes.Add("class", "selected"); aCoronaPubs.HRef = base.Context.Request.Path + ""; aCovidPubs.HRef = base.Context.Request.Path + "?Publications=Covid-19"; } else if (base.Context.Request.RawUrl.Contains("Publications=Covid-19")) { pt = DataIO.PublicationsType.Covid; aCovidPubs.HRef = ""; aCovidPubs.Attributes.Add("class", "selected"); aCoronaPubs.HRef = base.Context.Request.Path + ""; aAllPubs.HRef = base.Context.Request.Path + "?Publications=All"; } else { pt = DataIO.PublicationsType.Coronavirus; aCoronaPubs.HRef = ""; aCoronaPubs.Attributes.Add("class", "selected"); aAllPubs.HRef = base.Context.Request.Path + "?Publications=All"; aCovidPubs.HRef = base.Context.Request.Path + "?Publications=Covid-19"; } DateTime d = DateTime.Now; Profiles.Profile.Modules.CustomViewAuthorInAuthorship.DataIO data = new Profiles.Profile.Modules.CustomViewAuthorInAuthorship.DataIO(); List <Publication> publication = new List <Publication>(); Utilities.DataIO.ClassType type = Utilities.DataIO.ClassType.Unknown; Framework.Utilities.Namespace xmlnamespace = new Profiles.Framework.Utilities.Namespace(); XmlNamespaceManager namespaces = xmlnamespace.LoadNamespaces(BaseData); if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Person']", namespaces) != null) { type = Utilities.DataIO.ClassType.Person; } if (BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/rdf:type[@rdf:resource='http://xmlns.com/foaf/0.1/Group']", namespaces) != null) { type = Utilities.DataIO.ClassType.Group; } using (SqlDataReader reader = data.GetPublications(base.RDFTriple, type, pt)) { while (reader.Read()) { publication.Add(new Publication(reader["bibo_pmid"].ToString(), reader["vivo_pmcid"].ToString(), reader["prns_informationResourceReference"].ToString(), reader["vivo_webpage"].ToString(), Convert.ToInt32(reader["PMCCitations"]), reader["Fields"].ToString(), Convert.ToInt32(reader["TranslationHumans"]), Convert.ToInt32(reader["TranslationAnimals"]), Convert.ToInt32(reader["TranslationCells"]), Convert.ToInt32(reader["TranslationPublicHealth"]), Convert.ToInt32(reader["TranslationClinicalTrial"]))); } rpPublication.DataSource = publication; rpPublication.DataBind(); } if (type == Utilities.DataIO.ClassType.Group) { divPubHeaderText.Visible = false; } Framework.Utilities.DebugLogging.Log("PUBLICATION MODULE end Milliseconds:" + (DateTime.Now - d).TotalSeconds); }