示例#1
0
        public JsonResult GetGraphGeneration15(int SenderEntityID = -1, int RecipientEntityID = -1)
        {
            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            CytoscapeAndScopeData cytoscapeAndScopeData;

            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {
                cytoscapeAndScopeData = workspaceInfo.GetNodesAndEdgesTopCommunicatorsGeneration15(SenderEntityID, RecipientEntityID, connection, workspaceInfo.SocialNetworkDatabaseName);
            }

            return Json(cytoscapeAndScopeData, JsonRequestBehavior.AllowGet);
        }
示例#2
0
        public JsonResult GetSavedSearches(Int64 SenderEntityID = 1, Int64 RecipientEntityID = 1)
        {

            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            List<SavedSearch> SavedSearches;

            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {
                SavedSearches = workspaceInfo.GetSavedSearches(connection);
            }

            return Json(SavedSearches, JsonRequestBehavior.AllowGet);
        }
示例#3
0
        public JsonResult RunSavedSearch(Int32 SavedSearchArtifactID, double Depth = 1.0)
        {

            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            CytoscapeAndScopeData cytoscapeAndScopeData;

            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {
                //cytoscapeAndScopeData = workspaceInfo.RunSavedSearch(connection, workspaceInfo.SocialNetworkDatabaseName, SavedSearchArtifactID, Depth);
                cytoscapeAndScopeData = null;
            }

            return Json(cytoscapeAndScopeData, JsonRequestBehavior.AllowGet);
        }
示例#4
0
        public JsonResult GetGraphGeneration20Filter(int Levels = 2, int SenderEntityID = -1, int RecipientEntityID = -1, int MaximumParticipants = 2000000000, int SavedSearch = -1)
        {
            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            CytoscapeAndScopeData cytoscapeAndScopeData;

            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {

                cytoscapeAndScopeData = workspaceInfo.GetNodesAndEdgesTopCommunicatorsGeneration20Filter(
                    Levels, SenderEntityID, RecipientEntityID, connection, workspaceInfo.SocialNetworkDatabaseName, MaximumParticipants, SavedSearch);
            }

            return Json(cytoscapeAndScopeData, JsonRequestBehavior.AllowGet);
        }
示例#5
0
        public JsonResult UpdateScopeOnInitial(Int64 SenderEntityID = 1, Int64 RecipientEntityID = 1)
        {

            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            ScopeResult scopeResult = new ScopeResult();

            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {
                scopeResult.Senders = workspaceInfo.GetTopSenders(connection, workspaceInfo.SocialNetworkDatabaseName);
                scopeResult.Recipients = workspaceInfo.GetTopRecipients(connection, workspaceInfo.SocialNetworkDatabaseName);
                scopeResult.Pairs = workspaceInfo.GetTopSenderRecipientPairs(connection, workspaceInfo.SocialNetworkDatabaseName);
            }

            return Json(scopeResult, JsonRequestBehavior.AllowGet);
        }
示例#6
0
        public JsonResult EdgeClicked1(string EdgeID = "")
        {

            workspaceInfo = new WorkspaceInfo();
            workspaceInfo.GetWorkspaceInformation();
            workspaceInfo.SetSession(HttpContext.Session);

            string uri = "mmm";
            
            using (SqlConnection connection = workspaceInfo.GetAndOpenSQLConnection())
            {
                uri = workspaceInfo.DoEdgeClicked(EdgeID, connection, workspaceInfo.SocialNetworkDatabaseName);
            }

            if (workspaceInfo.IsInRelativity == 0)
            {
                uri = "#";
            }


            return Json(uri, JsonRequestBehavior.AllowGet);
            
        }