Inheritance: Profiles.Framework.Utilities.DataIO
Example #1
0
        public CustomEditAuthorInAuthorship(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();

            Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            propdata = new Profiles.Profile.Utilities.DataIO();

            this._subject      = Convert.ToInt64(Request.QueryString["subject"]);
            this._predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this._personId     = data.GetPersonID(_subject);

            Session["NodeID"]    = this._subject;
            Session["SessionID"] = sm.Session().SessionID;

            this.PropertyListXML = propdata.GetPropertyList(pagedata, base.PresentationXML, this._predicateuri, false, true, false);

            securityOptions.Subject        = this._subject;
            securityOptions.PredicateURI   = this._predicateuri;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            securityOptions.BubbleClick += SecurityDisplayed;
        }
Example #2
0
        private void DrawProfilesModule()
        {
            XsltArgumentList args = new XsltArgumentList();
            XslCompiledTransform xslt = new XslCompiledTransform();
            SessionManagement sm = new SessionManagement();

            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            string email = string.Empty;
            string imageemailurl = string.Empty;
            if (this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces) != null &&
                this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/vivo:email", this.Namespaces) == null)
            {
                email = this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces).InnerText;
                imageemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
            }

            args.AddParam("root", "", Root.Domain);
            if (email != string.Empty)
            {
                args.AddParam("email", "", imageemailurl);
            }
            args.AddParam("imgguid", "", Guid.NewGuid().ToString());

            litPersonalInfo.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/CustomViewPersonGeneralInfo/CustomViewPersonGeneralInfo.xslt"), args, base.BaseData.OuterXml);

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces) != null)
            {
                string imageurl = base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces).Value;
                imgPhoto.ImageUrl = imageurl + "&cachekey=" + Guid.NewGuid().ToString();
            }
            else
            {
                imgPhoto.Visible = false;
            }
        }
        private void DrawProfilesModule()
        {
            XsltArgumentList     args = new XsltArgumentList();
            XslCompiledTransform xslt = new XslCompiledTransform();
            SessionManagement    sm   = new SessionManagement();

            Utilities.DataIO data          = new Profiles.Profile.Utilities.DataIO();
            string           email         = string.Empty;
            string           imageemailurl = string.Empty;

            if (this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces) != null &&
                this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/vivo:email", this.Namespaces) == null)
            {
                email         = this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces).InnerText;
                imageemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
            }

            args.AddParam("root", "", Root.Domain);
            if (email != string.Empty)
            {
                args.AddParam("email", "", imageemailurl);
            }
            args.AddParam("imgguid", "", Guid.NewGuid().ToString());

            // Check for an ORCID
            string internalUsername = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.Profile.Data.Person().GetInternalUsername(Convert.ToInt64(Request.QueryString["Subject"]));

            Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person orcidPerson = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().GetByInternalUsername(internalUsername);
            if (orcidPerson.Exists && !orcidPerson.ORCIDIsNull)
            {
                args.AddParam("orcid", "", orcidPerson.ORCID);
                args.AddParam("orcidurl", "", Profiles.ORCID.Utilities.config.ORCID_URL + "/" + orcidPerson.ORCID);
                args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
            }
            else if (Profiles.ORCID.Utilities.config.ShowNoORCIDMessage && Profiles.ORCID.Utilities.config.Enabled)
            {
                //args.AddParam("orcid", "", "No ORCID id has been created for this user");
                args.AddParam("orcid", "", "Login to create your ORCID iD");
                args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                string qs = HttpUtility.UrlEncode("predicateuri=http%3a%2f%2fvivoweb.org%2fontology%2fcore!orcidId&module=DisplayItemToEdit&ObjectType=Literal");
                args.AddParam("orcidurl", "", Root.Domain + "/login/default.aspx?method=login&edit=true&editparams=" + qs);
                args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
            }


            litPersonalInfo.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/CustomViewPersonGeneralInfo/CustomViewPersonGeneralInfo.xslt"), args, base.BaseData.OuterXml);

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces) != null)
            {
                string imageurl = base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces).Value;
                imgPhoto.ImageUrl = imageurl + "&cachekey=" + Guid.NewGuid().ToString();
            }
            else
            {
                imgPhoto.Visible = false;
            }
        }
        private void DrawProfilesModule()
        {
            XsltArgumentList args = new XsltArgumentList();
            XslCompiledTransform xslt = new XslCompiledTransform();
            SessionManagement sm = new SessionManagement();

            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            string email = string.Empty;
            string imageemailurl = string.Empty;
            if (this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces) != null &&
                this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/vivo:email", this.Namespaces) == null)
            {
                email = this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces).InnerText;
                imageemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
            }

            args.AddParam("root", "", Root.Domain);
            if (email != string.Empty)
            {
                args.AddParam("email", "", imageemailurl);
            }
            args.AddParam("imgguid", "", Guid.NewGuid().ToString());

            litPersonalInfo.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/CustomViewPersonGeneralInfo/CustomViewPersonGeneralInfo.xslt"), args, base.BaseData.OuterXml);

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces) != null)
            {
                string imageurl = base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces).Value;
                imgPhoto.ImageUrl = imageurl + "&cachekey=" + Guid.NewGuid().ToString();
            }
            else
            {
                imgPhoto.Visible = false;
            }
        }
        private void DrawProfilesModule()
        {
            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            Search.Utilities.DataIO search = new Profiles.Search.Utilities.DataIO();

            XmlDocument xml = data.GetSameDepartment(base.RDFTriple);
            List<ListItem> items = new List<ListItem>();

            string departmenturi = xml.SelectSingleNode("Network/DepartmentURI").InnerText;
            string insitutitionuri = xml.SelectSingleNode("Network/InstitutionURI").InnerText;
            string searchrequest = string.Empty;

            search.SearchRequest("", "", "", "", insitutitionuri, "", departmenturi, "", "", "", "http://xmlns.com/foaf/0.1/Person", "25", "0", "", "", "", ref searchrequest);

            this.SearchRequest = searchrequest;

            foreach (XmlNode n in xml.SelectNodes("Network/Connection"))
            {
                items.Add(new ListItem(n.InnerText, n.SelectSingleNode("@URI").Value));

            }

            rptSameDepartment.DataSource = items;
            rptSameDepartment.DataBind();
        }
        public void DrawProfilesModule()
        {
            var           dataIO = new Profiles.Profile.Utilities.DataIO();
            StringBuilder html   = new StringBuilder();

            using (var reader = dataIO.GetConceptTopJournal(base.RDFTriple))
            {
                while (reader.Read())
                {
                    html.AppendFormat("<li><a href=\"javascript:alert('{0}')\">{1}</a></li>", reader["JournalTitle"].ToString(), reader["Journal"].ToString());
                }
                reader.Close();
            }

            // Hide section title if no Top Journals are returned
            if (html.ToString().Length == 0)
            {
                sectionTitle.Attributes.Add("style", "display: none;");
            }
            else
            {
                imgQuestion.ImageUrl = Root.Domain + "/Framework/Images/info.png";
                lineItemLiteral.Text = html.ToString();
            }
        }
        public CustomEditListProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Profiles.Edit.Utilities.DataIO();
            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            PropertyLabel = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value;

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            btnEditProperty.Text = "Add " + PropertyLabel;

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            this.MaxCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality").Value;
            this.MinCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MinCardinality").Value;

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = predicateuri;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);
        }
        public CustomEditMainImage(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            Edit.Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            SessionManagement     sm   = new SessionManagement();

            this.XMLData = pagedata;

            propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
            {
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            }
            else if (base.GetRawQueryStringItem("subject") != null)
            {
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            }
            else
            {
                Response.Redirect("~/search");
            }

            this.PredicateURI    = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false);
            litBackLink.Text     = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            securityOptions.Subject        = this.SubjectID;
            securityOptions.PredicateURI   = PredicateURI;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            securityOptions.BubbleClick += SecurityDisplayed;
        }
        public void DrawProfilesModule()
        {
            var dataIO = new Profiles.Profile.Utilities.DataIO();
            StringBuilder html = new StringBuilder();
            using (var reader = dataIO.GetConceptTopJournal(base.RDFTriple))
            {
                while (reader.Read())
                {
                    html.AppendFormat("<li><a href=\"javascript:alert('{0}')\">{1}</a></li>", reader["JournalTitle"].ToString(), reader["Journal"].ToString());
                }
                reader.Close();
            }

            // Hide section title if no Top Journals are returned
            if (html.ToString().Length==0)
            {
                sectionTitle.Attributes.Add("style", "display: none;");
            }
            else
            {
                imgQuestion.ImageUrl = Root.Domain + "/Framework/Images/info.png";
                imgQuestion.Width = 11;
                imgQuestion.Height = 11;
                lineItemLiteral.Text = html.ToString();
            }
        }
        private void DrawProfilesModule()
        {
            Utilities.DataIO        data   = new Profiles.Profile.Utilities.DataIO();
            Search.Utilities.DataIO search = new Profiles.Search.Utilities.DataIO();

            XmlDocument     xml   = data.GetSameDepartment(base.RDFTriple);
            List <ListItem> items = new List <ListItem>();


            if (xml.SelectSingleNode("Network/NumberOfConnections").InnerText != "0")
            {
                string departmenturi   = xml.SelectSingleNode("Network/DepartmentURI").InnerText;
                string insitutitionuri = xml.SelectSingleNode("Network/InstitutionURI").InnerText;
                string searchrequest   = string.Empty;

                search.SearchRequest("", "", "", "", insitutitionuri, "", departmenturi, "", "", "", "http://xmlns.com/foaf/0.1/Person", "25", "0", "", "", "", "", ref searchrequest);

                this.SearchRequest = searchrequest;

                foreach (XmlNode n in xml.SelectNodes("Network/Connection"))
                {
                    items.Add(new ListItem(n.InnerText, n.SelectSingleNode("@URI").Value));
                }

                rptSameDepartment.DataSource = items;
                rptSameDepartment.DataBind();
            }
            else
            {
                rptSameDepartment.Visible = false;
            }
        }
        public CustomEditEmail(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            base.BaseData = pagedata;

            data = new Profiles.Edit.Utilities.DataIO();
            this.Email = base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:email", base.Namespaces).InnerText;

            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            //create a new network triple request.
            base.RDFTriple = new RDFTriple(this.SubjectID, data.GetStoreNode(this.PredicateURI));

            base.RDFTriple.Expand = true;
            base.RDFTriple.ShowDetails = true;
            base.GetDataByURI();//This will reset the data to a Network.

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = this.PredicateURI;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);
        }
        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();
            }
        }
Example #13
0
        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();
            }
        }
        public EditObjectTypeProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            Edit.Utilities.DataIO data;
            SessionManagement sm = new SessionManagement();

            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Profiles.Edit.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#");

            GetSubjectProfile();

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false);
            this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value;
            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + this.PropertyLabel + "</b>";

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = PredicateURI;
            this.PredicateID = data.GetStoreNode(this.PredicateURI);
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            this._subject = Convert.ToInt64(Request.QueryString["subject"]);
            this._personId = data.GetPersonID(_subject);
        }
        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 void Page_Load(object sender, EventArgs e)
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            Profiles.Framework.Utilities.RDFTriple request = new RDFTriple(Convert.ToInt32(Request.QueryString["p"]));
            Response.ContentType = "application/xml; charset=utf-8";
            Response.Write(data.GetProfileNetworkForBrowser(request).InnerXml);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            Profiles.Framework.Utilities.RDFTriple request = new RDFTriple(Convert.ToInt32(Request.QueryString["p"]));
            Response.ContentType = "application/xml; charset=utf-8";
            Response.Write(data.GetProfileNetworkForBrowserXML(request).InnerXml);
        }
        public CustomEditEducationalTraining(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();

            this.XMLData = pagedata;

            data = new Edit.Utilities.DataIO();
            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
            {
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            }
            else if (base.GetRawQueryStringItem("subject") != null)
            {
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            }
            else
            {
                Response.Redirect("~/search");
            }

            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);

            this.PredicateID = data.GetStoreNode(predicateuri);

            base.GetNetworkProfile(this.SubjectID, this.PredicateID);

            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";


            securityOptions.Subject        = this.SubjectID;
            securityOptions.PredicateURI   = predicateuri;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            if (Request.QueryString["new"] != null && Session["new"] != null)
            {
                Session["pnlInsertEducationalTraining.Visible"] = null;
                Session["new"] = null;

                if (Session["newclose"] != null)
                {
                    Session["newclose"] = null;
                    btnInsertCancel_OnClick(this, new EventArgs());
                }
                else
                {
                    btnEditEducation_OnClick(this, new EventArgs());
                }
            }

            securityOptions.BubbleClick += SecurityDisplayed;
        }
        protected void InitAssets()
        {
            System.Web.UI.HtmlControls.HtmlLink NetworkBrowsercss = new System.Web.UI.HtmlControls.HtmlLink();
            NetworkBrowsercss.Href = Root.Domain + "/Profile/CSS/NetworkBrowser.css";
            NetworkBrowsercss.Attributes["rel"] = "stylesheet";
            NetworkBrowsercss.Attributes["type"] = "text/css";
            NetworkBrowsercss.Attributes["media"] = "all";
            Page.Header.Controls.Add(NetworkBrowsercss);

            HtmlGenericControl jsscript0 = new HtmlGenericControl("script");
            jsscript0.Attributes.Add("type", "text/javascript");
            jsscript0.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkRadial/JavaScript/watchdog.js");
            Page.Header.Controls.Add(jsscript0);

            HtmlGenericControl jsscript1 = new HtmlGenericControl("script");
            jsscript1.Attributes.Add("type", "text/javascript");
            jsscript1.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/scriptaculous/lib/prototype.js");
            Page.Header.Controls.Add(jsscript1);

            HtmlGenericControl jsscript2 = new HtmlGenericControl("script");
            jsscript2.Attributes.Add("type", "text/javascript");
            jsscript2.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/scriptaculous/src/scriptaculous.js");
            Page.Header.Controls.Add(jsscript2);

            HtmlGenericControl jsscript3 = new HtmlGenericControl("script");
            jsscript3.Attributes.Add("type", "text/javascript");
            jsscript3.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/JavaScript/networkBrowserClass.js");
            Page.Header.Controls.Add(jsscript3);

            HtmlGenericControl jsscript4 = new HtmlGenericControl("script");
            jsscript4.Attributes.Add("type", "text/javascript");
            jsscript4.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/JavaScript/networkClusterLayoutEngine.js");
            Page.Header.Controls.Add(jsscript4);

            HtmlGenericControl jsscript5 = new HtmlGenericControl("script");
            jsscript5.Attributes.Add("type", "text/javascript");
            jsscript5.Attributes.Add("src", "//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js");
            Page.Header.Controls.Add(jsscript5);

            HtmlGenericControl script = new HtmlGenericControl("script");
            script.Attributes.Add("type", "text/javascript");
            script.InnerHtml = "function loadClusterView() {" +
                " network_browser.Init('" + Root.Domain + "/profile/modules/NetworkCluster/NetworkClusterSvc.aspx?p='); " +
                " network_browser.loadNetwork('" + Request.QueryString["Subject"].ToString() + "'); " +
                "};";
            Page.Header.Controls.Add(script);

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            RDFTriple request = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));
            XmlDocument x = data.GetProfileNetworkForBrowserXML(request);
            System.Xml.Xsl.XsltArgumentList args = new System.Xml.Xsl.XsltArgumentList();
            args.AddParam("root", "", Root.Domain);
            DateTime d = DateTime.Now;
            System.Xml.Xsl.XslCompiledTransform xslt = new System.Xml.Xsl.XslCompiledTransform();
            litNetworkText.Text = Profiles.Framework.Utilities.XslHelper.TransformInMemory(Server.MapPath("~/profile/XSLT/NetworkTable.xslt"), args, x.InnerXml);

            iFrameFlashGraph.Attributes.Add("data-src", Root.Domain + "/profile/Modules/NetworkClusterFlash/Default.aspx?Subject=" + Request.QueryString["subject"] + "&Predicate=" + Request.QueryString["Predicate"]);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            Profiles.Framework.Utilities.RDFTriple request = new RDFTriple(Convert.ToInt32(Request.QueryString["p"]));
            Response.ContentType = "application/json; charset=utf-8";
            Response.AppendHeader("Access-Control-Allow-Origin", "*");
            Response.Write(data.GetProfileNetworkForBrowser(request));
        }
        private void DrawProfilesModule()
        {
            XsltArgumentList args = new XsltArgumentList();
            XslCompiledTransform xslt = new XslCompiledTransform();
            SessionManagement sm = new SessionManagement();

            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            string email = string.Empty;
            string imageemailurl = string.Empty;
            if (this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces) != null &&
                this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/vivo:email", this.Namespaces) == null)
            {
                email = this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces).InnerText;
                imageemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
            }

            args.AddParam("root", "", Root.Domain);
            if (email != string.Empty)
            {
                args.AddParam("email", "", imageemailurl);
            }
            args.AddParam("imgguid", "", Guid.NewGuid().ToString());

            // Check for an ORCID
            string internalUsername = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.Profile.Data.Person().GetInternalUsername(Convert.ToInt64(Request.QueryString["Subject"]));
            Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person orcidPerson = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().GetByInternalUsername(internalUsername);
            if (orcidPerson.Exists && !orcidPerson.ORCIDIsNull)
            {
                args.AddParam("orcid", "", orcidPerson.ORCID);
                args.AddParam("orcidurl", "", Profiles.ORCID.Utilities.config.ORCID_URL + "/" + orcidPerson.ORCID);
                args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
            }
            else if (Profiles.ORCID.Utilities.config.ShowNoORCIDMessage && Profiles.ORCID.Utilities.config.Enabled)
            {
                //args.AddParam("orcid", "", "No ORCID id has been created for this user");
                args.AddParam("orcid", "", "Login to create your ORCID iD");
                args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                string qs = HttpUtility.UrlEncode("predicateuri=http%3a%2f%2fvivoweb.org%2fontology%2fcore!orcidId&module=DisplayItemToEdit&ObjectType=Literal");
                args.AddParam("orcidurl", "", Root.Domain + "/login/default.aspx?method=login&edit=true&editparams=" + qs);
                args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
            }

            litPersonalInfo.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/CustomViewPersonGeneralInfo/CustomViewPersonGeneralInfo.xslt"), args, base.BaseData.OuterXml);

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces) != null)
            {
                string imageurl = base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces).Value;
                imgPhoto.ImageUrl = imageurl + "&cachekey=" + Guid.NewGuid().ToString();
            }
            else
            {
                imgPhoto.Visible = false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            Profiles.Framework.Utilities.RDFTriple request = new RDFTriple(Convert.ToInt32(Request.QueryString["p"]));
            Response.ContentType = "application/json; charset=utf-8";
            Response.AppendHeader("Access-Control-Allow-Origin", "*");
            Response.Write(data.GetProfileNetworkForBrowser(request));
        }
Example #23
0
            //***************************************************************************************************************************************
            public Modules.NetworkMap.NetworkMap.GoogleMapLocation GetDefaultZoom()
            {
                Modules.NetworkMap.NetworkMap.GoogleMapLocation loc = null;
                Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();


                loc = data.GetGoogleMapZoomLinks().Find(delegate(Modules.NetworkMap.NetworkMap.GoogleMapLocation item) { return(item.DefaultLevel == "True"); });

                return(loc);
            }
Example #24
0
        public void DrawProfilesModule()
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["Subject"] == null)
            {
                return;
            }

            base.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["Subject"]));



            dlGoogleMapLinks.DataSource = data.GetGoogleMapZoomLinks();
            dlGoogleMapLinks.DataBind();

            SqlDataReader reader  = null;
            SqlDataReader reader2 = null;

            Profiles.Framework.Utilities.SessionManagement session = new SessionManagement();

            GoogleMapHelper gmh = new GoogleMapHelper();

            if (base.GetModuleParamString("MapType") == "CoAuthor")
            {
                reader  = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 0, session.Session().SessionID);
                reader2 = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 1, session.Session().SessionID);
            }

            if (base.GetModuleParamString("MapType") == "SimilarTo")
            {
                reader  = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, false, session.Session().SessionID);
                reader2 = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, true, session.Session().SessionID);
            }



            string googleCode, tableText;

            gmh.MapPlotPeople(base.RDFTriple.Subject, reader, reader2, out googleCode, out tableText);
            litGoogleCode.Text  = googleCode;
            litNetworkText.Text = tableText;


            if (!reader.IsClosed)
            {
                reader.Close();
            }

            if (!reader2.IsClosed)
            {
                reader2.Close();
            }
        }
        public EditObjectTypeProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            Edit.Utilities.DataIO data;
            SessionManagement sm = new SessionManagement();

            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Profiles.Edit.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#");

            GetSubjectProfile();

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, PredicateURI, false, true, false);
            this.PropertyLabel = PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value;
            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + this.PropertyLabel + "</b>";

            //Quick add for adding a note on the format of grant info when adding manually
            if (PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/@Label").Value == "Research")
            {
                litGrantNote1.Text = "Please use the following format when adding the grant information: ";
                litGrantNote2.Text = "Funding Agency: Agency Name - Title: Grant Title - Award Number: Grant ID Number - Total direct costs: $amount - Start Date: yyyy-mm-dd - End Date: yyyy-mm-dd <br /> Or for subaward:<br /> Subaward: Name of Pass-Through Institution - Funding Agency: Agency Name - Title: Grant Title - Award Number: Grant ID Number - Total direct costs: $amount - Start Date: yyyy-mm-dd - End Date: yyyy-mm-dd";
            }

            //Quick fix to allow only Admin and Curators to edit Visibility privacy
            securityOptions.userRole = propdata.GetUserRole(sm.Session().SessionID);
            if (securityOptions.userRole == -40 || securityOptions.userRole == -50)
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = true;
                securityOptions.FindControl("lbSecurityOptions").Visible = true;
            }
            else
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = false;
                securityOptions.FindControl("lbSecurityOptions").Visible = false;
            }

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = PredicateURI;
            this.PredicateID = data.GetStoreNode(this.PredicateURI);
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            this._subject = Convert.ToInt64(Request.QueryString["subject"]);
            this._personId = data.GetPersonID(_subject);
        }
        public EditDataTypeProperty(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Profiles.Edit.Utilities.DataIO();
            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            PropertyLabel = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value;

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            btnEditProperty.Text = "Add " + PropertyLabel;

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            // Put hack to not insert null MaxCardinality Value
            if (this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality") == null)
            {
                this.MaxCardinality = "1";
            }
            else
            {
                this.MaxCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality").Value;
            }

            this.MinCardinality = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MinCardinality").Value;

            //Quick fix to allow only Admin and Curators to edit Visibility privacy
            securityOptions.userRole = propdata.GetUserRole(sm.Session().SessionID);
            if (securityOptions.userRole == -40 || securityOptions.userRole == -50)
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = true;
                securityOptions.FindControl("lbSecurityOptions").Visible = true;
            }
            else
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = false;
                securityOptions.FindControl("lbSecurityOptions").Visible = false;
            }

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = predicateuri;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);
        }
        public PropertyList(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            XmlDocument presentationxml = base.PresentationXML;
            SessionManagement sm = new SessionManagement();

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            this.PropertyListXML = data.GetPropertyList(pagedata, presentationxml,"",false,false,true);

            mp = new ModulesProcessing();
        }
        public PropertyList(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            XmlDocument       presentationxml = base.PresentationXML;
            SessionManagement sm = new SessionManagement();

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();


            this.PropertyListXML = data.GetPropertyList(pagedata, presentationxml, "", false, false, true);

            mp = new ModulesProcessing();
        }
        // UCSF
        internal static string getEmailPlainText(String emailEncrypted)
        {
            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            SqlDataReader reader;

            SqlCommand cmd = new SqlCommand("SELECT [Utility.Application].[fnDecryptBase64RC4] ( '" + emailEncrypted + "',   (Select [value] from [Framework.].parameter with(nolock) where ParameterID = 'RC4EncryptionKey'))");
            reader = data.GetSQLDataReader(cmd);
            reader.Read();

            string emailPlain = reader[0].ToString();
            reader.Close();
            return emailPlain;
        }
        public CustomEditAwardOrHonor(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            this.XMLData = pagedata;

            data = new Edit.Utilities.DataIO();
            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);

            this.PredicateID = data.GetStoreNode(predicateuri);

            base.GetNetworkProfile(this.SubjectID, this.PredicateID);

            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = predicateuri;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            if (Request.QueryString["new"] != null && Session["new"] != null)
            {
                Session["pnlInsertAward.Visible"] = null;
                Session["new"] = null;

                if (Session["newclose"] != null)
                {
                    Session["newclose"] = null;
                    btnInsertCancel_OnClick(this,new EventArgs());

                }
                else
                {
                    btnEditAwards_OnClick(this, new EventArgs());
                }

            }

            securityOptions.BubbleClick += SecurityDisplayed;
        }
Example #31
0
        public EditPersonalGadget(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();

            base.BaseData = pagedata;

            data = new Profiles.ORNG.Utilities.DataIO();
            Profiles.Edit.Utilities.DataIO    editdata = new Profiles.Edit.Utilities.DataIO();
            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
            {
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            }
            else if (base.GetRawQueryStringItem("subject") != null)
            {
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            }
            else
            {
                Response.Redirect("~/search");
            }

            this.PredicateURI    = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            litBackLink.Text     = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";


            //create a new network triple request.
            base.RDFTriple = new RDFTriple(this.SubjectID, editdata.GetStoreNode(this.PredicateURI));

            base.RDFTriple.Expand      = true;
            base.RDFTriple.ShowDetails = true;
            base.GetDataByURI();//This will reset the data to a Network.

            // Profiles OpenSocial Extension by UCSF
            uri    = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value;
            uri    = uri.Substring(0, uri.IndexOf(Convert.ToString(this.SubjectID)) + Convert.ToString(this.SubjectID).Length);
            appId  = Convert.ToInt32(base.GetModuleParamString("AppId"));
            om     = OpenSocialManager.GetOpenSocialManager(uri, Page, true);
            gadget = om.AddGadget(appId, base.GetModuleParamString("View"), base.GetModuleParamString("OptParams"));

            securityOptions.Subject        = this.SubjectID;
            securityOptions.PredicateURI   = this.PredicateURI;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            hasGadget = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@NumberOfConnections").Value) > 0;
        }
        // UCSF
        static internal string getEmailPlainText(String emailEncrypted)
        {
            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            SqlDataReader    reader;

            SqlCommand cmd = new SqlCommand("SELECT [Utility.Application].[fnDecryptBase64RC4] ( '" + emailEncrypted + "',   (Select [value] from [Framework.].parameter with(nolock) where ParameterID = 'RC4EncryptionKey'))");

            reader = data.GetSQLDataReader(cmd);
            reader.Read();

            string emailPlain = reader[0].ToString();

            reader.Close();
            return(emailPlain);
        }
 public void DrawProfilesModule()
 {
     var dataIO = new Profiles.Profile.Utilities.DataIO();
     StringBuilder html = new StringBuilder();
     using (var reader = dataIO.GetConceptSimilarMesh(base.RDFTriple))
     {
         while (reader.Read())
         {
             html.AppendFormat("<li><a href='{0}'>{1}</a></li>", reader["ObjectURI"].ToString(), reader["DescriptorName"].ToString());
         }
         reader.Close();
     }
     imgQuestion.ImageUrl = Root.Domain + "/Framework/Images/info.png";
     lineItemLiteral.Text = html.ToString();
 }
        public void DrawProfilesCloud()
        {
            XmlDocument document = new XmlDocument();
            string xml = string.Empty;

            Profiles.Profile.Utilities.DataIO pdata = new Profiles.Profile.Utilities.DataIO();
            RDFTriple request = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));

            document.LoadXml(pdata.GetNetworkCloud(request).ToString().Replace("&", "&amp;"));

            XslCompiledTransform xslt = new XslCompiledTransform();
            XsltArgumentList args = new XsltArgumentList();
            args.AddParam("root", "", Root.Domain);

            litListView.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/NetworkList/NetworkList.xslt"), args, document.OuterXml);
        }
Example #35
0
        public void LoadPageData()
        {
            Framework.Utilities.Namespace namespaces = new Namespace();

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            this.PresentationXML = data.GetPresentationData(this.RDFTriple);

            XmlNode x = this.PresentationXML.SelectSingleNode("Presentation[1]/ExpandRDFList[1]");

            if (x != null)
                this.RDFTriple.ExpandRDFList = x.OuterXml;

            this.RDFData = data.GetRDFData(this.RDFTriple);

            this.RDFNamespaces = namespaces.LoadNamespaces(this.RDFData);
        }
Example #36
0
        private void DrawProfilesModule()
        {
            base.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["Subject"]));

            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            SqlDataReader    reader;

            // Get support text
            using (reader = data.GetPublicationSupportHtml(base.RDFTriple, base.MasterPage.CanEdit))
            {
                while (reader.Read())
                {
                    supportText.Text = reader["HTML"].ToString();
                }
                reader.Close();
            }
        }
        public void DrawProfilesModule()
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["Subject"] == null)
                return;

            base.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["Subject"]));

            dlGoogleMapLinks.DataSource = data.GetGoogleMapZoomLinks();
            dlGoogleMapLinks.DataBind();

            SqlDataReader reader = null;
            SqlDataReader reader2 = null;

            Profiles.Framework.Utilities.SessionManagement session = new SessionManagement();

            GoogleMapHelper gmh = new GoogleMapHelper();

            try
            {
                if (base.GetModuleParamString("MapType") == "CoAuthor")
                {

                    reader = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 0, session.Session().SessionID);
                    reader2 = data.GetGMapUserCoAuthors(base.RDFTriple.Subject, 1, session.Session().SessionID);

                }

                if (base.GetModuleParamString("MapType") == "SimilarTo")
                {
                    reader = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, false, session.Session().SessionID);
                    reader2 = data.GetGMapUserSimilarPeople(base.RDFTriple.Subject, true, session.Session().SessionID);
                }

                litGoogleCode.Text = gmh.MapPlotPeople(base.RDFTriple.Subject, reader, reader2);
            }
            finally
            {
                if (!reader.IsClosed)
                    reader.Close();

                if (!reader2.IsClosed)
                    reader2.Close();
            }
        }
        private void DrawProfilesModule()
        {
            base.RDFTriple = new RDFTriple(Convert.ToInt64(Request.QueryString["Subject"]));

            Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            SqlDataReader reader;

            // Get support text
            using (reader = data.GetPublicationSupportHtml(base.RDFTriple, base.MasterPage.CanEdit))
            {
                while (reader.Read())
                {
                    supportText.Text = reader["HTML"].ToString();
                }
                reader.Close();
            }
        }
        public CustomEditEagleI(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();

            base.BaseData = pagedata;

            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Edit.Utilities.DataIO();



            if (Request.QueryString["subject"] != null)
            {
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            }
            else if (base.GetRawQueryStringItem("subject") != null)
            {
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            }
            else
            {
                Response.Redirect("~/search");
            }

            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            litBackLink.Text     = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";


            //create a new network triple request.
            base.RDFTriple = new RDFTriple(this.SubjectID, data.GetStoreNode(predicateuri));

            base.RDFTriple.Expand      = true;
            base.RDFTriple.ShowDetails = true;
            base.GetDataByURI();//This will reset the data to a Network.



            securityOptions.Subject        = this.SubjectID;
            securityOptions.PredicateURI   = predicateuri;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);
        }
        public EditPersonalGadget(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            base.BaseData = pagedata;

            data = new Profiles.ORNG.Utilities.DataIO();
            Profiles.Edit.Utilities.DataIO editdata = new Profiles.Edit.Utilities.DataIO();
            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();

            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            this.PredicateURI = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, this.PredicateURI, false, true, false);
            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            //create a new network triple request.
            base.RDFTriple = new RDFTriple(this.SubjectID, editdata.GetStoreNode(this.PredicateURI));

            base.RDFTriple.Expand = true;
            base.RDFTriple.ShowDetails = true;
            base.GetDataByURI();//This will reset the data to a Network.

            // Profiles OpenSocial Extension by UCSF
            uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value;
            uri = uri.Substring(0, uri.IndexOf(Convert.ToString(this.SubjectID)) + Convert.ToString(this.SubjectID).Length);
            appId = Convert.ToInt32(base.GetModuleParamString("AppId"));
            om = OpenSocialManager.GetOpenSocialManager(uri, Page, true);
            if (om.IsEnabled())
            {
                gadget = om.AddOntologyGadget(appId, base.GetModuleParamString("View"), base.GetModuleParamString("OptParams"));
            }

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = this.PredicateURI;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            hasGadget = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@NumberOfConnections").Value) > 0;
        }
        public CustomEditMailingAddress(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            base.BaseData  = pagedata;

            Profiles.Profile.Utilities.DataIO propdata = new Profiles.Profile.Utilities.DataIO();
            data = new Profiles.Edit.Utilities.DataIO();
            if (Request.QueryString["subject"] != null)
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            else if (base.GetRawQueryStringItem("subject") != null)
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            else
                Response.Redirect("~/search");

            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID.ToString() + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            //create a new network triple request.
            base.RDFTriple = new RDFTriple(this.SubjectID, data.GetStoreNode(predicateuri));

            base.RDFTriple.Expand = true;
            base.RDFTriple.ShowDetails = true;
            base.GetDataByURI();//This will reset the data to a Network.

            //Quick fix to allow only Admin and Curators to edit Visibility privacy
            securityOptions.userRole = propdata.GetUserRole(sm.Session().SessionID);
            if (securityOptions.userRole == -40 || securityOptions.userRole == -50)
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = true;
                securityOptions.FindControl("lbSecurityOptions").Visible = true;
            }
            else
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = false;
                securityOptions.FindControl("lbSecurityOptions").Visible = false;
            }

            securityOptions.Subject = this.SubjectID;
            securityOptions.PredicateURI = predicateuri;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);
        }
Example #42
0
        public void DrawProfilesCloud()
        {
            XmlDocument document = new XmlDocument();
            string      xml      = string.Empty;

            Profiles.Profile.Utilities.DataIO pdata = new Profiles.Profile.Utilities.DataIO();
            RDFTriple request = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));


            document.LoadXml(pdata.GetNetworkCloud(request).ToString().Replace("&", "&amp;"));

            XslCompiledTransform xslt = new XslCompiledTransform();
            XsltArgumentList     args = new XsltArgumentList();

            args.AddParam("root", "", Root.Domain);

            litListView.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/NetworkList/NetworkList.xslt"), args, document.OuterXml);
        }
        private void DrawProfilesModule()
        {
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            List<Publication> publication = new List<Publication>();

            SqlDataReader reader = data.GetPublications(base.RDFTriple);

            try
            {
                while (reader.Read())
                {

                    publication.Add(new Publication(reader["bibo_pmid"].ToString(), reader["prns_informationResourceReference"].ToString()));

                }

                rpPublication.DataSource = publication;
                rpPublication.DataBind();
            }
            finally
            {
                if (!reader.IsClosed)
                    reader.Close();
            }
               // Get timeline bar chart
               using (reader = data.GetGoogleTimeline(base.RDFTriple, "[Profile.Module].[NetworkAuthorshipTimeline.Person.GetData]"))
               {
               try
               {
                   while (reader.Read())
                   {
                       timelineBar.Src = reader["gc"].ToString();
                   }
               }
               finally
               {
                   reader.Close();
               }
               }

               // Login link
              loginLiteral.Text = String.Format("<a href='{0}'>login</a>", Root.Domain + "/login/default.aspx?method=login&edit=true");
        }
        public void DrawProfilesModule()
        {
            XmlDocument document = new XmlDocument();
            string      xml      = string.Empty;


            Utilities.DataIO data    = new Profiles.Profile.Utilities.DataIO();
            RDFTriple        request = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));


            document.LoadXml(data.GetNetworkCategory(request).ToString());

            XslCompiledTransform xslt = new XslCompiledTransform();
            XsltArgumentList     args = new XsltArgumentList();

            args.AddParam("root", "", Root.Domain);

            litCategoryList.Text = Framework.Utilities.XslHelper.TransformInMemory(Server.MapPath("~/Profile/modules/NetworkCategories/NetworkCategories.xslt"), args, document.OuterXml);
        }
        public CustomEditFreetextKeyword(XmlDocument pagedata, List <ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();

            propdata = new Profiles.Profile.Utilities.DataIO();
            data     = new Profiles.Edit.Utilities.DataIO();
            string predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            PropertyLabel        = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value;

            if (Request.QueryString["subject"] != null)
            {
                this.SubjectID = Convert.ToInt64(Request.QueryString["subject"]);
            }
            else if (base.GetRawQueryStringItem("subject") != null)
            {
                this.SubjectID = Convert.ToInt64(base.GetRawQueryStringItem("subject"));
            }
            else
            {
                Response.Redirect("~/search");
            }

            litBackLink.Text = "<a href='" + Root.Domain + "/edit/" + this.SubjectID + "'>Edit Menu</a> &gt; <b>" + PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@Label").Value + "</b>";

            //btnEditProperty.Text = "Add " + PropertyLabel;
            imbAddArror.Visible = true;

            this.PropertyListXML = propdata.GetPropertyList(this.BaseData, base.PresentationXML, predicateuri, false, true, false);
            this.MaxCardinality  = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MaxCardinality").Value;
            this.MinCardinality  = this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@MinCardinality").Value;

            securityOptions.Subject        = this.SubjectID;
            securityOptions.PredicateURI   = predicateuri;
            securityOptions.PrivacyCode    = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            txtLabel.Attributes.Add("data-autocomplete-url", Root.Domain + "/edit/Modules/CustomEditFreetextKeyword/keywordAutocomplete.aspx?keys=");
        }
Example #46
0
        public void LoadPageData()
        {
            Framework.Utilities.Namespace namespaces = new Namespace();

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            this.PresentationXML = data.GetPresentationData(this.RDFTriple);

            XmlNode x = this.PresentationXML.SelectSingleNode("Presentation[1]/ExpandRDFList[1]");

            if (x != null)
            {
                this.RDFTriple.ExpandRDFList = x.OuterXml;
            }

            this.RDFData = data.GetRDFData(this.RDFTriple);



            this.RDFNamespaces = namespaces.LoadNamespaces(this.RDFData);
        }
Example #47
0
        private void DrawProfilesModule()
        {
            DateTime d = DateTime.Now;

            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            List <Publication> publication         = new List <Publication>();

            using (SqlDataReader reader = data.GetPublications(base.RDFTriple))
            {
                while (reader.Read())
                {
                    publication.Add(new Publication(reader["bibo_pmid"].ToString(), reader["vivo_pmcid"].ToString(), reader["prns_informationResourceReference"].ToString(), reader["vivo_webpage"].ToString()));
                }

                rpPublication.DataSource = publication;
                rpPublication.DataBind();
            }

            // Get timeline bar chart
            using (SqlDataReader reader = data.GetGoogleTimeline(base.RDFTriple, "[Profile.Module].[NetworkAuthorshipTimeline.Person.GetData]"))
            {
                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");

            Framework.Utilities.DebugLogging.Log("PUBLICATION MODULE end Milliseconds:" + (DateTime.Now - d).TotalSeconds);
        }
        public void DrawProfilesModule()
        {
            Utilities.DataIO dataIO = new Profiles.Profile.Utilities.DataIO();
            StringBuilder html = new StringBuilder();
            List<string> reader = dataIO.GetEagleI(base.RDFTriple.Subject);
            string eagleIEmail = ConfigurationManager.AppSettings["EAGLEI.EmailAddress"];

            litHead.Text = "<table><tr><td><table style='width:480px;font-weight:bold;color:#888;padding:5px 0px;'>" +
                "<tr><td valign='top' xstyle='width:90%'>This researcher has shared information about their research resources <br/>in the eagle-i Network.  To update or add resource records, contact <br/>" +
                "<a href='mailto:" + eagleIEmail + "'>" + eagleIEmail + "</a>.</td>" +
                "</tr></table></td><td align='center' valign='middle'><img src='" + Root.Domain + "/profile/modules/CustomViewEagleI/Images/logo.gif'/></td></tr></table>";

            for (int i = 0; i < reader.Count; i++)
            {
                html.Append("<div class='mentor-completed'>");
                html.Append(reader[i]);
                html.Append("</div>");
            }

            litHtml.Text = html.ToString();
        }
        public void DrawProfilesModule()
        {
            Utilities.DataIO dataIO      = new Profiles.Profile.Utilities.DataIO();
            StringBuilder    html        = new StringBuilder();
            List <string>    reader      = dataIO.GetEagleI(base.RDFTriple.Subject);
            string           eagleIEmail = ConfigurationManager.AppSettings["EAGLEI.EmailAddress"];

            litHead.Text = "<table><tr><td><table style='width:480px;font-weight:bold;color:#888;padding:5px 0px;'>" +
                           "<tr><td valign='top' xstyle='width:90%'>This researcher has shared information about their research resources <br/>in the eagle-i Network.  To update or add resource records, contact <br/>" +
                           "<a href='mailto:" + eagleIEmail + "'>" + eagleIEmail + "</a>.</td>" +
                           "</tr></table></td><td align='center' valign='middle'><img src='" + Root.Domain + "/profile/modules/CustomViewEagleI/Images/logo.gif'/></td></tr></table>";


            for (int i = 0; i < reader.Count; i++)
            {
                html.Append("<div class='mentor-completed'>");
                html.Append(reader[i]);
                html.Append("</div>");
            }

            litHtml.Text = html.ToString();
        }
Example #50
0
        public void LoadRDFData()
        {
            Framework.Utilities.DebugLogging.Log("{Page Calling} Profile.ProfileData.LoadRDFData() start " + ((System.Web.UI.TemplateControl)(this)).AppRelativeVirtualPath);
            XmlDocument xml           = new XmlDocument();
            Namespace   rdfnamespaces = new Namespace();
            DataIO      data          = new DataIO();

            //if (HttpContext.Current.Request.Headers["Offset"] != null)
            //    this.RDFTriple.Offset = HttpContext.Current.Request.Headers["Offset"];

            //if (HttpContext.Current.Request.Headers["Limit"] != null)
            //    this.RDFTriple.Limit = HttpContext.Current.Request.Headers["Limit"];

            //if (HttpContext.Current.Request.Headers["ExpandRDFList"] != null)
            //    this.RDFTriple.ExpandRDFList = HttpContext.Current.Request.Headers["ExpandRDFList"];


            xml                = data.GetRDFData(this.RDFTriple);
            this.RDFData       = xml;
            this.RDFNamespaces = rdfnamespaces.LoadNamespaces(xml);
            Framework.Utilities.DebugLogging.Log("{Page Calling} Profile.ProfileData.LoadRDFData() end" + ((System.Web.UI.TemplateControl)(this)).AppRelativeVirtualPath);
        }
        private void DrawProfilesModule()
        {
            Profiles.Profile.Utilities.DataIO dataIO = new Profiles.Profile.Utilities.DataIO();
            StringBuilder html              = new StringBuilder();
            List <string> reader            = dataIO.GetEagleI(this.SubjectID);
            string        eagleIEmail       = ConfigurationManager.AppSettings["EAGLEI.EmailAddress"];
            string        eagleIInstitution = ConfigurationManager.AppSettings["EAGLEI.InstitutionName"];

            html.Append("<div class='mentor-completed'>Information in the research resource module is provided automatically from the ");
            html.Append(eagleIInstitution);
            html.Append(" repository of the eagle-i Network. To update information or list your resources in eagle-i, please contact <a href='mailto:");
            html.Append(eagleIEmail);
            html.Append("'>");
            html.Append(eagleIEmail);
            html.Append("</a>. For more information about the eagle-i research resource network, visit <a href='http://www.eagle-i.net'>www.eagle-i.net</a>.</div><br>");


            if (reader.Count == 0)
            {
                html
                .Append("<div class='mentor-current'>")
                .AppendFormat("<div><i>You have no current records in the eagle-i system.</i></div></div>");
            }
            else
            {
                for (int loop = 0; loop < reader.Count; loop++)
                {
                    html
                    .Append("<div class='mentor-current'>")
                    .Append(reader[loop])
                    .Append("</div>");
                }
            }


            // Pass to control
            litEagleI.Text = html.ToString();
        }
        private void DrawProfilesModule()
        {
            DateTime d = DateTime.Now;
            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            List<Publication> publication = new List<Publication>();

            using (SqlDataReader reader = data.GetPublications(base.RDFTriple))
            {
                while (reader.Read())
                {
                    publication.Add(new Publication(reader["bibo_pmid"].ToString(), reader["prns_informationResourceReference"].ToString()));
                }

                rpPublication.DataSource = publication;
                rpPublication.DataBind();
            }

               // Get timeline bar chart
            using (SqlDataReader reader = data.GetGoogleTimeline(base.RDFTriple, "[Profile.Module].[NetworkAuthorshipTimeline.Person.GetData]"))
               {
                while(reader.Read())
                {
                    timelineBar.Src = reader["gc"].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");

              Framework.Utilities.DebugLogging.Log("PUBLICATION MODULE end Milliseconds:" + (DateTime.Now - d).TotalSeconds);
        }
        public CustomEditAuthorInAuthorship(XmlDocument pagedata, List<ModuleParams> moduleparams, XmlNamespaceManager pagenamespaces)
            : base(pagedata, moduleparams, pagenamespaces)
        {
            SessionManagement sm = new SessionManagement();
            Utilities.DataIO data = new Profiles.Edit.Utilities.DataIO();
            propdata = new Profiles.Profile.Utilities.DataIO();

            this._subject = Convert.ToInt64(Request.QueryString["subject"]);
            this._predicateuri = Request.QueryString["predicateuri"].Replace("!", "#");
            this._personId = data.GetPersonID(_subject);

            Session["NodeID"] = this._subject;
            Session["SessionID"] = sm.Session().SessionID;

            this.PropertyListXML = propdata.GetPropertyList(pagedata, base.PresentationXML, this._predicateuri, false, true, false);

            //Quick fix to allow only Admin and Curators to edit Visibility privacy
            securityOptions.userRole = propdata.GetUserRole(sm.Session().SessionID);
            if (securityOptions.userRole == -40 || securityOptions.userRole == -50)
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = true;
                securityOptions.FindControl("lbSecurityOptions").Visible = true;
            }
            else
            {
                securityOptions.FindControl("imbSecurityOptions").Visible = false;
                securityOptions.FindControl("lbSecurityOptions").Visible = false;
            }

            securityOptions.Subject = this._subject;
            securityOptions.PredicateURI = this._predicateuri;
            securityOptions.PrivacyCode = Convert.ToInt32(this.PropertyListXML.SelectSingleNode("PropertyList/PropertyGroup/Property/@ViewSecurityGroup").Value);
            securityOptions.SecurityGroups = new XmlDataDocument();
            securityOptions.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            securityOptions.BubbleClick += SecurityDisplayed;
        }
        public override IProfileConnection GetConnection()
        {
            var dataIO = new DataIO();

            // Loop through reader and fill object
            using (var rdr = dataIO.GetProfileConnection(new RDFTriple(this.Subject.NodeId, 0, this.Object.NodeId), this.StoredProcedure))
            {
                bool headerLoaded = false;
                while (rdr.Read())
                {
                    // Data is denormalized.  Load header object once
                    if (headerLoaded == false)
                    {
                        this.ConnectionStrength = double.Parse(rdr["TotalOverallWeight"].ToString());
                    }

                    SimilarConcept concept = new SimilarConcept
                    {
                        MeshTerm       = rdr["MeshHeader"].ToString(),
                        OverallWeight  = double.Parse(rdr["OverallWeight"].ToString()),
                        ConceptProfile = rdr["ObjectURI"].ToString()
                    };

                    concept.Subject.KeywordWeight        = double.Parse(rdr["KeywordWeight1"].ToString());
                    concept.Subject.ConceptConnectionURI = rdr["ConnectionURI1"].ToString();
                    concept.Object.KeywordWeight         = double.Parse(rdr["KeywordWeight2"].ToString());
                    concept.Object.ConceptConnectionURI  = rdr["ConnectionURI2"].ToString();

                    this.ConnectionDetails.Add(concept);

                    headerLoaded = true;
                }
            }

            return(this);
        }
        private void DrawProfilesModule()
        {
            List<GenericListItem> gli = new List<GenericListItem>();
            bool canedit = false;
            Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            List<List<SecurityItem>> si = new List<List<SecurityItem>>();
            List<SecurityItem> singlesi;
            this.Dropdown = new List<GenericListItem>();
            this.PropertyList = data.GetPropertyList(this.BaseData, base.PresentationXML, "", true, true, false);

            this.Subject = Convert.ToInt64(Request.QueryString["subject"]);

            this.SecurityGroups = new XmlDocument();
            this.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            litBackLink.Text = "<h2>Edit Menu</h2>";

            foreach (XmlNode group in this.PropertyList.SelectNodes("//PropertyList/PropertyGroup"))
            {
                singlesi = new List<SecurityItem>();

                foreach (XmlNode node in group.SelectNodes("Property"))
                {
                    if (node.SelectSingleNode("@EditExisting").Value == "false"
                        && node.SelectSingleNode("@EditAddExisting").Value == "false"
                        && node.SelectSingleNode("@EditAddNew").Value == "false"
                        && node.SelectSingleNode("@EditDelete").Value == "false")
                    {
                        canedit = false;
                    }
                    else
                    {
                        canedit = true;
                    }

                    string objecttype = string.Empty;
                    switch (node.SelectSingleNode("@ObjectType").Value)
                    {
                        case "1":
                            objecttype = "Literal";
                            break;
                        case "0":
                            objecttype = "Entity";
                            break;
                    }

                    string editlink = "<a class=listTableLink href=\"" + Root.Domain + "/edit/default.aspx?subject=" + this.Subject.ToString() + "&predicateuri=" + node.SelectSingleNode("@URI").Value.Replace("#", "!") + "&module=DisplayItemToEdit&ObjectType=" + objecttype + "\" >" + node.SelectSingleNode("@Label").Value + "</a>";

                    singlesi.Add(new SecurityItem(node.ParentNode.SelectSingleNode("@Label").Value, node.SelectSingleNode("@Label").Value,
                        node.SelectSingleNode("@URI").Value,
                        Convert.ToInt32(node.SelectSingleNode("@NumberOfConnections").Value),
                        Convert.ToInt32(node.SelectSingleNode("@ViewSecurityGroup").Value),
                        this.SecurityGroups.SelectSingleNode("SecurityGroupList/SecurityGroup[@ID='" + node.SelectSingleNode("@ViewSecurityGroup").Value + "']/@Label").Value,
                        node.SelectSingleNode("@ObjectType").Value, canedit, editlink));
                }
                si.Add(singlesi);
            }

            // add one for "Not Added"
            gli.Add(new GenericListItem("Not Added", "This item has not been added to your Profile page."));
            foreach (XmlNode securityitem in this.SecurityGroups.SelectNodes("SecurityGroupList/SecurityGroup"))
            {
                this.Dropdown.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value,
                    securityitem.SelectSingleNode("@ID").Value));

                gli.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value, securityitem.SelectSingleNode("@Description").Value));
            }

            repPropertyGroups.DataSource = si;
            repPropertyGroups.DataBind();

            BuildSecurityKey(gli);
        }
Example #56
0
 public void LoadPresentationXML()
 {
     Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
     this.PresentationXML = data.GetPresentationData(this.RDFTriple);
 }
        public void DrawProfilesModule()
        {
            var dataIO = new Profiles.Profile.Utilities.DataIO();

            // Get xml data
            XDocument xDoc = dataIO.GetConceptMeshInfo(base.RDFTriple);

            // Get nodes
            IEnumerable<XElement> conceptNodes = xDoc.Descendants("DescriptorRecord").Elements("ConceptList").Elements("Concept");
            IEnumerable<XElement> treeNumberNodes = xDoc.Descendants("DescriptorRecord").Elements("TreeNumberList").Elements("TreeNumber");
            IEnumerable<XElement> generalConceptNodes = xDoc.Descendants("ParentDescriptors").Elements("Descriptor");
            IEnumerable<XElement> relatedConceptNodes = xDoc.Descendants("SiblingDescriptors").Elements("Descriptor");
            IEnumerable<XElement> specificConceptNodes = xDoc.Descendants("ChildDescriptors").Elements("Descriptor");

            // Definition tab
            var definitionScopeNode = conceptNodes.Where(x=> x.Attribute("PreferredConceptYN").Value == "Y").Elements("ScopeNote").FirstOrDefault();
            litDefinition.Text = (definitionScopeNode != null) ? definitionScopeNode.Value : "No definition found.";

            // Details tab - DescriptorID
            litDescriptorId.Text = xDoc.Descendants("DescriptorRecord").Elements("DescriptorUI").FirstOrDefault().Value;

            // Details tab - MeSH Numbers
            foreach (XElement node in treeNumberNodes)
            {
                litMeshNumbers.Text += "<div>"+node.Value+"</div>";
            }

            // Details tab - Concept/Terms
            foreach (XElement concept in conceptNodes)
            {
                string terms = "";
                foreach(XElement term in concept.Elements("TermList").Elements("Term").Select(x => x.Element("String")))
                {
                    terms += String.Format("<li><span>{0}</span></li>", term.Value);
                }

                litConceptTerms.Text += String.Format(
                    "<div><a href='javascript:void(0);'>{0}</a><ul style='display: none;'>{1}</ul></div>",
                    concept.Elements("ConceptName").Elements("String").FirstOrDefault().Value,
                    terms
                );
            }

            // More General Concepts tab
            DisableTabLink(generalConceptNodes, "generalConceptLink");
            foreach (XElement node in generalConceptNodes)
            {
                var conceptName = node.Element("DescriptorName");
                var treeNumber = node.Element("TreeNumber");
                var nodeURI = node.Element("NodeURI");

                int paddingLeft = 0;
                int depth = Convert.ToInt32(node.Element("Depth").Value);

                if (depth > 1)
                {
                    paddingLeft = 8 * depth;
                }

                if (paddingLeft == 0) // first item is not a link
                {
                    litGeneralConcepts.Text += String.Format(
                        "<li><span>{0} [{1}]</span></li>",
                        (conceptName != null) ? conceptName.Value : "",
                        (treeNumber != null) ? treeNumber.Value : ""
                    );
                }
                else
                {
                    litGeneralConcepts.Text += String.Format(
                        "<li style='margin-left:{0}px;'><span><a href='{1}'>{2}</a> [{3}]</span></li>",
                        paddingLeft.ToString(), // set indentation
                        (nodeURI != null) ? nodeURI.Value : "",
                        (conceptName.Value == this.ConceptName) ? "<b>"+conceptName.Value+"</b>" : conceptName.Value, // bold text if node concept is same as concept profile name
                        (treeNumber != null) ? treeNumber.Value : ""
                    );
                }
            }

            // Related concept tabs
            DisableTabLink(relatedConceptNodes, "relatedConceptLink");
            foreach (XElement node in relatedConceptNodes)
            {
                var conceptName = node.Element("DescriptorName");
                var conceptUri = node.Element("NodeURI");
                int depth = Convert.ToInt32(node.Element("Depth").Value);
                int paddingLeft = (depth > 1) ? 8 * depth : 0;

                litRelatedConcepts.Text += String.Format(
                    "<li style='margin-left:{0}px;'><span><a href='{1}'>{2}</a></span></li>",
                    paddingLeft.ToString(), // set indentation
                    (conceptUri != null) ? conceptUri.Value : "",
                    (conceptName.Value == this.ConceptName) ? "<b>" + conceptName.Value + "</b>" : conceptName.Value // bold text if node concept is same as concept profile name
                );
            }

            // Specific concept tabs
            DisableTabLink(specificConceptNodes, "specificConceptLink");
            foreach (XElement node in specificConceptNodes)
            {
                var conceptName = node.Element("DescriptorName");
                var nodeURI = node.Element("NodeURI");
                int depth = Convert.ToInt32(node.Element("Depth").Value);
                int paddingLeft = (depth > 1) ? 8 * depth : 0;

                if (paddingLeft == 0) // first item is not a link
                {
                    litSpecificConcepts.Text += String.Format(
                        "<li><span>{0}</span></li>",
                        (conceptName != null) ? conceptName.Value : ""
                    );
                }
                else
                {

                    litSpecificConcepts.Text += String.Format(
                        "<li style='margin-left:{0}px;'><span><a href='{1}'>{2}</a></span></li>",
                        paddingLeft.ToString(), // set indentation
                        (nodeURI != null) ? nodeURI.Value : "",
                        (conceptName.Value == this.ConceptName) ? "<b>" + conceptName.Value + "</b>" : conceptName.Value // bold text if node concept is same as concept profile name

                    );
                }
            }
        }
Example #58
0
        protected void InitAssets()
        {
            System.Web.UI.HtmlControls.HtmlLink NetworkBrowsercss = new System.Web.UI.HtmlControls.HtmlLink();
            NetworkBrowsercss.Href = Root.Domain + "/Profile/CSS/NetworkBrowser.css";
            NetworkBrowsercss.Attributes["rel"]   = "stylesheet";
            NetworkBrowsercss.Attributes["type"]  = "text/css";
            NetworkBrowsercss.Attributes["media"] = "all";
            Page.Header.Controls.Add(NetworkBrowsercss);

            HtmlGenericControl jsscript0 = new HtmlGenericControl("script");

            jsscript0.Attributes.Add("type", "text/javascript");
            jsscript0.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkRadial/JavaScript/watchdog.js");
            Page.Header.Controls.Add(jsscript0);

            HtmlGenericControl jsscript1 = new HtmlGenericControl("script");

            jsscript1.Attributes.Add("type", "text/javascript");
            jsscript1.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/scriptaculous/lib/prototype.js");
            Page.Header.Controls.Add(jsscript1);

            HtmlGenericControl jsscript2 = new HtmlGenericControl("script");

            jsscript2.Attributes.Add("type", "text/javascript");
            jsscript2.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/scriptaculous/src/scriptaculous.js");
            Page.Header.Controls.Add(jsscript2);

            HtmlGenericControl jsscript3 = new HtmlGenericControl("script");

            jsscript3.Attributes.Add("type", "text/javascript");
            jsscript3.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/JavaScript/networkBrowserClass.js");
            Page.Header.Controls.Add(jsscript3);

            HtmlGenericControl jsscript4 = new HtmlGenericControl("script");

            jsscript4.Attributes.Add("type", "text/javascript");
            jsscript4.Attributes.Add("src", Root.Domain + "/Profile/Modules/NetworkCluster/JavaScript/networkClusterLayoutEngine.js");
            Page.Header.Controls.Add(jsscript4);

            HtmlGenericControl jsscript5 = new HtmlGenericControl("script");

            jsscript5.Attributes.Add("type", "text/javascript");
            jsscript5.Attributes.Add("src", "//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js");
            Page.Header.Controls.Add(jsscript5);


            HtmlGenericControl script = new HtmlGenericControl("script");

            script.Attributes.Add("type", "text/javascript");
            script.InnerHtml = "function loadClusterView() {" +
                               " network_browser.Init('" + Root.Domain + "/profile/modules/NetworkCluster/NetworkClusterSvc.aspx?p='); " +
                               " network_browser.loadNetwork('" + Request.QueryString["Subject"].ToString() + "'); " +
                               "};";
            Page.Header.Controls.Add(script);


            Profiles.Profile.Utilities.DataIO data = new Profiles.Profile.Utilities.DataIO();
            RDFTriple   request = new RDFTriple(Convert.ToInt64(Request.QueryString["subject"]));
            XmlDocument x       = data.GetProfileNetworkForBrowserXML(request);

            System.Xml.Xsl.XsltArgumentList args = new System.Xml.Xsl.XsltArgumentList();
            args.AddParam("root", "", Root.Domain);
            DateTime d = DateTime.Now;

            System.Xml.Xsl.XslCompiledTransform xslt = new System.Xml.Xsl.XslCompiledTransform();
            litNetworkText.Text = Profiles.Framework.Utilities.XslHelper.TransformInMemory(Server.MapPath("~/profile/XSLT/NetworkTable.xslt"), args, x.InnerXml);

            iFrameFlashGraph.Attributes.Add("data-src", Root.Domain + "/profile/Modules/NetworkClusterFlash/Default.aspx?Subject=" + Request.QueryString["subject"] + "&Predicate=" + Request.QueryString["Predicate"]);
        }
Example #59
0
        private void DrawProfilesModule()
        {
            XsltArgumentList     args = new XsltArgumentList();
            XslCompiledTransform xslt = new XslCompiledTransform();
            SessionManagement    sm   = new SessionManagement();

            Utilities.DataIO data          = new Profiles.Profile.Utilities.DataIO();
            string           email         = string.Empty;
            string           imageemailurl = string.Empty;
            string           audioemailurl = string.Empty;

            if (this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces) != null &&
                this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/vivo:email", this.Namespaces) == null)
            {
                email         = this.BaseData.SelectSingleNode("rdf:RDF[1]/rdf:Description[1]/prns:emailEncrypted", this.Namespaces).InnerText;
                imageemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
                audioemailurl = string.Format(Root.Domain + "/profile/modules/CustomViewPersonGeneralInfo/" + "EmailAudioHandler.ashx?msg={0}", HttpUtility.UrlEncode(email));
            }

            args.AddParam("root", "", Root.Domain);
            if (email != string.Empty)
            {
                args.AddParam("email", "", imageemailurl);
                args.AddParam("emailAudio", "", audioemailurl);
                args.AddParam("emailAudioImg", "", Root.Domain + "/Framework/Images/listen.jpg");
            }
            args.AddParam("imgguid", "", Guid.NewGuid().ToString());



            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/vivo:orcidId", base.Namespaces) != null) // Only show ORCID if security settings allow it
            {
                args.AddParam("orcid", "", base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/vivo:orcidId", base.Namespaces).InnerText);
                args.AddParam("orcidurl", "", Profiles.ORCID.Utilities.config.ORCID_URL + "/" + base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/vivo:orcidId", base.Namespaces).InnerText);
                args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
            }
            else if (Profiles.ORCID.Utilities.config.ShowNoORCIDMessage && Profiles.ORCID.Utilities.config.Enabled)
            {
                // Check for an ORCID
                string internalUsername = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.Profile.Data.Person().GetInternalUsername(Convert.ToInt64(Request.QueryString["Subject"]));
                Profiles.ORCID.Utilities.ProfilesRNSDLL.BO.ORCID.Person orcidPerson = new Profiles.ORCID.Utilities.ProfilesRNSDLL.BLL.ORCID.Person().GetByInternalUsername(internalUsername);
                if (!orcidPerson.Exists || orcidPerson.ORCIDIsNull)
                {
                    //args.AddParam("orcid", "", "No ORCID id has been created for this user");
                    args.AddParam("orcid", "", "Login to create your ORCID iD");
                    args.AddParam("orcidinfosite", "", Profiles.ORCID.Utilities.config.InfoSite);
                    string qs = HttpUtility.UrlEncode("predicateuri=http%3a%2f%2fvivoweb.org%2fontology%2fcore!orcidId&module=DisplayItemToEdit&ObjectType=Literal");
                    args.AddParam("orcidurl", "", Root.Domain + "/login/default.aspx?method=login&edit=true&editparams=" + qs);
                    args.AddParam("orcidimage", "", Root.Domain + "/Framework/Images/orcid_16x16(1).gif");
                    args.AddParam("orcidimageguid", "", Guid.NewGuid().ToString());
                }
            }
            args.AddParam("nodeid", "", Request.QueryString["Subject"]);
            litPersonalInfo.Text = XslHelper.TransformInMemory(Server.MapPath("~/Profile/Modules/CustomViewPersonGeneralInfo/CustomViewPersonGeneralInfo.xslt"), args, base.BaseData.OuterXml);

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces) != null)
            {
                string imageurl = base.BaseData.SelectSingleNode("//rdf:RDF/rdf:Description[1]/prns:mainImage/@rdf:resource", base.Namespaces).Value;
                imgPhoto.ImageUrl = imageurl + "&cachekey=" + Guid.NewGuid().ToString();
            }
            else
            {
                imgPhoto.Visible = false;
            }

            // OpenSocial.  Allows gadget developers to show test gadgets if you have them installed
            string            uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value;
            OpenSocialManager om  = OpenSocialManager.GetOpenSocialManager(uri, Page);

            if (om.IsVisible() && om.GetUnrecognizedGadgets().Count > 0)
            {
                pnlSandboxGadgets.Visible = true;
                litSandboxGadgets.Visible = true;
                string sandboxDivs = "";
                foreach (PreparedGadget gadget in om.GetUnrecognizedGadgets())
                {
                    sandboxDivs += "<div id='" + gadget.GetChromeId() + "' class='gadgets-gadget-parent'></div>";
                }
                litSandboxGadgets.Text = sandboxDivs;
                om.LoadAssets();
                // Add this just in case it is needed.
                new ORNGProfileRPCService(Page, this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/foaf:firstName", base.Namespaces).InnerText, uri);
            }
        }
        private void DrawProfilesModule()
        {
            List <GenericListItem> gli = new List <GenericListItem>();
            bool canedit = false;

            Profile.Utilities.DataIO    data = new Profiles.Profile.Utilities.DataIO();
            List <List <SecurityItem> > si   = new List <List <SecurityItem> >();
            List <SecurityItem>         singlesi;

            this.Dropdown     = new List <GenericListItem>();
            this.PropertyList = data.GetPropertyList(this.BaseData, base.PresentationXML, "", true, true, false);

            this.Subject = Convert.ToInt64(Request.QueryString["subject"]);

            this.SecurityGroups = new XmlDocument();
            this.SecurityGroups.LoadXml(base.PresentationXML.DocumentElement.LastChild.OuterXml);

            litBackLink.Text = "<b>Edit Menu</b>";


            foreach (XmlNode group in this.PropertyList.SelectNodes("//PropertyList/PropertyGroup"))
            {
                singlesi = new List <SecurityItem>();

                foreach (XmlNode node in group.SelectNodes("Property"))
                {
                    if (node.SelectSingleNode("@EditExisting").Value == "false" &&
                        node.SelectSingleNode("@EditAddExisting").Value == "false" &&
                        node.SelectSingleNode("@EditAddNew").Value == "false" &&
                        node.SelectSingleNode("@EditDelete").Value == "false")
                    {
                        canedit = false;
                    }
                    else
                    {
                        canedit = true;
                    }

                    singlesi.Add(new SecurityItem(node.ParentNode.SelectSingleNode("@Label").Value, node.SelectSingleNode("@Label").Value,
                                                  node.SelectSingleNode("@URI").Value,
                                                  Convert.ToInt32(node.SelectSingleNode("@NumberOfConnections").Value),
                                                  Convert.ToInt32(node.SelectSingleNode("@ViewSecurityGroup").Value),
                                                  this.SecurityGroups.SelectSingleNode("SecurityGroupList/SecurityGroup[@ID='" + node.SelectSingleNode("@ViewSecurityGroup").Value + "']/@Label").Value,
                                                  node.SelectSingleNode("@ObjectType").Value, canedit));
                }
                si.Add(singlesi);
            }

            foreach (XmlNode securityitem in this.SecurityGroups.SelectNodes("SecurityGroupList/SecurityGroup"))
            {
                this.Dropdown.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value,
                                                      securityitem.SelectSingleNode("@ID").Value));

                gli.Add(new GenericListItem(securityitem.SelectSingleNode("@Label").Value, securityitem.SelectSingleNode("@Description").Value));
            }

            repPropertyGroups.DataSource = si;
            repPropertyGroups.DataBind();

            BuildSecurityKey(gli);

            // Profiles OpenSocial Extension by UCSF
            string            uri = this.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/@rdf:about", base.Namespaces).Value;
            OpenSocialManager om  = OpenSocialManager.GetOpenSocialManager(uri, Page, true, true);

            if (om.IsVisible())
            {
                om.LoadAssets();
                pnlOpenSocial.Visible = true;
                new Responder(uri, Page);
            }
        }