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", "", "", "", "", false, 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; } }
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(); }
private void Search() { XmlDocument searchresults; Search.Utilities.DataIO data = new Profiles.Search.Utilities.DataIO(); List <EntityState> es = new List <EntityState>(); string searchuri = string.Empty; searchuri = ddlPropertyList.SelectedValue; searchresults = data.Search(data.SearchRequest(txtKeyword.Text.Trim(), "false", "", searchuri, "100", "0"), true); foreach (XmlNode x in searchresults.SelectNodes("SearchResults/Network/Connection")) { es.Add(new EntityState(x.InnerText, x.SelectSingleNode("@URI").Value)); } gridSearchResults.DataSource = es; gridSearchResults.DataBind(); pnlProxySearchResults.Visible = true; }
private void Search() { XmlDocument searchresults; Search.Utilities.DataIO data = new Profiles.Search.Utilities.DataIO(); List<EntityState> es = new List<EntityState>(); string searchuri = string.Empty; searchuri = ddlPropertyList.SelectedValue; searchresults = data.Search(data.SearchRequest(txtKeyword.Text.Trim(),"false", "", searchuri, "100", "0"), true); foreach (XmlNode x in searchresults.SelectNodes("SearchResults/Network/Connection")) { es.Add(new EntityState(x.InnerText, x.SelectSingleNode("@URI").Value)); } gridSearchResults.DataSource = es; gridSearchResults.DataBind(); pnlProxySearchResults.Visible = true; }
//public void Page_Load(object sender, EventArgs e) override protected void OnInit(EventArgs e) { masterpage = (Framework.Template)base.Master; string tab = string.Empty; if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] != null) { this.SearchType = Session["DIRECTSEARCHTYPE"].ToString(); } else if (Request.QueryString["searchtype"] == null && Request.Form["searchtype"] != null && Session["DIRECTSEARCHTYPE"] == null) { this.SearchType = Request.Form["searchtype"]; } else if (Request.QueryString["searchtype"] != null && Request.Form["searchtype"] == null && Session["DIRECTSEARCHTYPE"] == null) { this.SearchType = Request.QueryString["searchtype"]; } if (Session["DIRECTSEARCHREQUEST"] != null) { masterpage.SearchRequest = Session["DIRECTSEARCHREQUEST"].ToString(); string searchrequest = masterpage.SearchRequest; Session["DIRECTKEYWORD"] = null; Session["DIRECTSEARCHREQUEST"] = null; Session["DIRECTSEARCHTYPE"] = null; Utilities.DataIO data = new Profiles.Search.Utilities.DataIO(); data.SearchRequest("", "", "", "", "", "", "", "", "", "", "", "15", "0", "", "", "", "", ref searchrequest); Response.Redirect(Root.Domain + "/search/default.aspx?searchtype=" + this.SearchType + "&searchrequest=" + searchrequest, true); } if (this.SearchType.IsNullOrEmpty()) { this.LoadPresentationXML("searchform"); if (Request.QueryString["tab"] != null) { masterpage.Tab = Request.QueryString["tab"]; } else { masterpage.Tab = ""; } masterpage.RDFData = null; masterpage.RDFNamespaces = null; } else { if (Request.QueryString["tab"] != null) { masterpage.Tab = Request.QueryString["tab"]; } else { masterpage.Tab = ""; } this.LoadPresentationXML(this.SearchType); this.LoadRDFSearchResults(); } this.LoadAssets(); masterpage.PresentationXML = this.PresentationXML; }
private void DrawProfilesModule() { XsltArgumentList args = new XsltArgumentList(); string searchfor = string.Empty; string classgroupuri = string.Empty; string classuri = string.Empty; string searchrequest = string.Empty; string exactphrase = string.Empty; XmlDocument xmlsearchrequest; if (Request.QueryString["searchfor"] != null) { searchfor = Request.QueryString["searchfor"]; } else { searchfor = Request.Form["txtSearchFor"]; } if (Request.QueryString["classgroupuri"] != null) { classgroupuri = HttpUtility.UrlDecode(Request.QueryString["classgroupuri"]); } else { classgroupuri = HttpUtility.UrlDecode(Request.Form["classgroupuri"]); } if (classgroupuri != null) { if (classgroupuri.Contains("!")) { classgroupuri = classgroupuri.Replace('!', '#'); } } else { classgroupuri = string.Empty; } if (Request.QueryString["classuri"] != null) { classuri = HttpUtility.UrlDecode(Request.QueryString["classuri"]); } else { classuri = HttpUtility.UrlDecode(Request.Form["classuri"]); } if (classuri != null) { if (classuri.Contains("!")) { classuri = classuri.Replace('!', '#'); } } else { classuri = string.Empty; } Search.Utilities.DataIO data = new Profiles.Search.Utilities.DataIO(); if (Request.QueryString["searchrequest"] != null) { searchrequest = Request.QueryString["searchrequest"]; if (searchfor == null) { xmlsearchrequest = new XmlDocument(); xmlsearchrequest.LoadXml(data.DecryptRequest(searchrequest)); searchfor = xmlsearchrequest.SelectSingleNode("SearchOptions/MatchOptions/SearchString").InnerText; } } if (Request.QueryString["exactphrase"] != null) { exactphrase = Request.QueryString["exactphrase"]; } else { exactphrase = "false"; } //Grab the full results so I can get the counts, this comes from the cache cloud. this.SearchResults = data.Search(data.SearchRequest(searchfor, exactphrase, "", "", "0", "100"), false); Int64 total = 0; foreach (XmlNode x in this.SearchResults.SelectNodes("rdf:RDF/rdf:Description/vivo:overview/prns:matchesClassGroupsList/prns:matchesClassGroup", this.Namespaces)) { total += Convert.ToInt64(x.SelectSingleNode("prns:numberOfConnections", this.Namespaces).InnerText); } args.AddParam("total", "", total); args.AddParam("searchfor", "", searchfor); args.AddParam("exactphrase", "", exactphrase); args.AddParam("root", "", Root.Domain); args.AddParam("classGrpURIpassedin", "", classgroupuri); args.AddParam("classURIpassedin", "", classuri); XslCompiledTransform xslt = new XslCompiledTransform(); litEverythingPassiveResults.Text = XslHelper.TransformInMemory(Server.MapPath("~/Search/Modules/SearchEverythingFacets/SearchEverythingFacets.xslt"), args, this.SearchResults.OuterXml); }