public static MultiMapSet <string, string> GenerateAxisMap(string axis_name, Library library, HashSet <string> parent_fingerprints)
        {
            switch (axis_name)
            {
            case "Tag": return(TagExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "Ratings": return(RatingExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "ReadingStage": return(ReadingStageExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "Author": return(AuthorExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "Year": return(YearExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "AutoTag": return(AITagExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "Publication": return(PublicationExplorerControl.GetNodeItems(library, parent_fingerprints));

            case "Theme": return(ThemeExplorerControl.GetNodeItems_STATIC(library, parent_fingerprints));

            case "Type": return(TypeExplorerControl.GetNodeItems(library, parent_fingerprints));

            default:
                Logging.Warn("Unknown pivot axis {0}", axis_name);
                return(GenerateMap_None(library, parent_fingerprints));
            }
        }
Пример #2
0
        public static MultiMapSet <string, string> GenerateAxisMap(string axis_name, WebLibraryDetail web_library_detail, HashSet <string> parent_fingerprints)
        {
            WPFDoEvents.AssertThisCodeIs_NOT_RunningInTheUIThread();

            switch (axis_name)
            {
            case "Tag": return(TagExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Ratings": return(RatingExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "ReadingStage": return(ReadingStageExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Author": return(AuthorExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Year": return(YearExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "AutoTag": return(AITagExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Publication": return(PublicationExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Theme": return(ThemeExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            case "Type": return(TypeExplorerControl.GetNodeItems(web_library_detail, parent_fingerprints));

            default:
                Logging.Warn("Unknown pivot axis {0}", axis_name);
                return(GenerateMap_None(web_library_detail, parent_fingerprints));
            }
        }
        public static void Test2()
        {
            Library library = WebLibraryManager.Instance.Library_Guest;

            while (!library.LibraryIsLoaded)
            {
                Thread.Sleep(100);
            }

            List <PDFDocument> pdf_documents = library.PDFDocuments;

            HashSet <string>             parent_fingerprints = null;
            MultiMapSet <string, string> map_ratings         = RatingExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_reading_stage   = ReadingStageExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_author          = AuthorExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_year            = YearExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_ai_tag          = AITagExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_tag             = TagExplorerControl.GetNodeItems(library, parent_fingerprints);
            MultiMapSet <string, string> map_publication     = PublicationExplorerControl.GetNodeItems(library, parent_fingerprints);

            MultiMapSet <string, string> map_y_axis = map_tag;
            MultiMapSet <string, string> map_x_axis = map_author;

            PivotResult pivot_result = GeneratePivot(map_y_axis, map_x_axis);
        }
        public static MultiMapSet <string, string> GenerateAxisMap(string axis_name, Library library, HashSet <string> parent_fingerprints)
        {
            if (false)
            {
                return(null);
            }

            else if ("Tag" == axis_name)
            {
                return(TagExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("Ratings" == axis_name)
            {
                return(RatingExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("ReadingStage" == axis_name)
            {
                return(ReadingStageExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("Author" == axis_name)
            {
                return(AuthorExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("Year" == axis_name)
            {
                return(YearExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("AutoTag" == axis_name)
            {
                return(AITagExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("Publication" == axis_name)
            {
                return(PublicationExplorerControl.GetNodeItems(library, parent_fingerprints));
            }
            else if ("Theme" == axis_name)
            {
                return(ThemeExplorerControl.GetNodeItems_STATIC(library, parent_fingerprints));
            }
            else if ("Type" == axis_name)
            {
                return(TypeExplorerControl.GetNodeItems(library, parent_fingerprints));
            }

            else
            {
                Logging.Warn("Unknown pivot axis {0}", axis_name);
                return(GenerateMap_None(library, parent_fingerprints));
            }
        }