protected virtual void SetConnectionData() { var dataIO = new Profiles.Profile.Utilities.DataIO(); this.ConnectionDetails = new List <Publication>(); // Loop through reader and fill object using (var rdr = dataIO.GetProfileConnection(new RDFTriple(this.Subject.NodeId, 0, this.Object.NodeId), this.StoredProcedureName)) { bool headerLoaded = false; while (rdr.Read()) { // Data is denormalized. Load header object once if (headerLoaded == false) { this.ConnectionStrength = double.Parse(rdr["TotalOverallWeight"].ToString()); } this.ConnectionDetails.Add(new Publication { PMID = long.Parse(rdr["PMID"].ToString()), Description = rdr["Reference"].ToString(), Score = double.Parse(rdr["OverallWeight"].ToString()) }); headerLoaded = true; } } }
protected override void SetConnectionData() { var dataIO = new Profiles.Profile.Utilities.DataIO(); // Loop through reader and fill object using (var rdr = dataIO.GetProfileConnection(new RDFTriple(this.Subject.NodeId, 0, this.Object.NodeId), this.StoredProcedureName)) { bool headerLoaded = false; while (rdr.Read()) { // Data is denormalized. Load header object once if (headerLoaded == false) { this.ConnectionStrength = double.Parse(rdr["TotalOverallWeight"].ToString()); } SimilarConcept sim = new SimilarConcept { MeshTerm = rdr["MeshHeader"].ToString(), OverallWeight = double.Parse(rdr["OverallWeight"].ToString()), ConceptProfile = rdr["ObjectURI"].ToString() }; sim.Subject.KeywordWeight = double.Parse(rdr["KeywordWeight1"].ToString()); sim.Subject.ConceptConnectionURI = rdr["ConnectionURI1"].ToString(); sim.Object.KeywordWeight = double.Parse(rdr["KeywordWeight2"].ToString()); sim.Object.ConceptConnectionURI = rdr["ConnectionURI2"].ToString(); this.ConnectionDetails.Add(sim); headerLoaded = true; } rdr.Close(); } }