1use super::hypermedia_store::{CommonsVisibility, HypermediaStore, LibraryEntry, LibrarySection};
8use serde::{Deserialize, Serialize};
9
10pub const QAPP_MEDIA_TYPE: &str = "application/x-webizen-qapp";
12
13#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
15pub struct QappCatalogEntry {
16 pub id: &'static str,
17 pub title: &'static str,
18 pub category: &'static str,
20}
21
22impl QappCatalogEntry {
23 pub fn asset_uri(self) -> String {
24 format!("qapp://studio/{}", self.id)
25 }
26
27 pub fn display_title(self) -> String {
28 self.title.to_string()
29 }
30}
31
32pub const STUDIO_QAPP_CATALOG: &[QappCatalogEntry] = &[
34 QappCatalogEntry {
35 id: "african_american_studies",
36 title: "African American Studies",
37 category: "social-sciences",
38 },
39 QappCatalogEntry {
40 id: "anthropology",
41 title: "Anthropology",
42 category: "social-sciences",
43 },
44 QappCatalogEntry {
45 id: "archaeology",
46 title: "Archaeology",
47 category: "social-sciences",
48 },
49 QappCatalogEntry {
50 id: "area_and_regional_studies",
51 title: "Area And Regional Studies",
52 category: "social-sciences",
53 },
54 QappCatalogEntry {
55 id: "cultural_studies",
56 title: "Cultural Studies",
57 category: "social-sciences",
58 },
59 QappCatalogEntry {
60 id: "economics",
61 title: "Economics",
62 category: "social-sciences",
63 },
64 QappCatalogEntry {
65 id: "gender_and_sexuality_studies",
66 title: "Gender And Sexuality Studies",
67 category: "social-sciences",
68 },
69 QappCatalogEntry {
70 id: "geography_human_geography",
71 title: "Geography Human Geography",
72 category: "social-sciences",
73 },
74 QappCatalogEntry {
75 id: "history",
76 title: "History",
77 category: "social-sciences",
78 },
79 QappCatalogEntry {
80 id: "international_relations",
81 title: "International Relations",
82 category: "social-sciences",
83 },
84 QappCatalogEntry {
85 id: "political_science",
86 title: "Political Science",
87 category: "social-sciences",
88 },
89 QappCatalogEntry {
90 id: "psychology",
91 title: "Psychology",
92 category: "social-sciences",
93 },
94 QappCatalogEntry {
95 id: "sociology",
96 title: "Sociology",
97 category: "social-sciences",
98 },
99 QappCatalogEntry {
100 id: "art_history",
101 title: "Art History",
102 category: "humanities",
103 },
104 QappCatalogEntry {
105 id: "classics",
106 title: "Classics",
107 category: "humanities",
108 },
109 QappCatalogEntry {
110 id: "comparative_literature",
111 title: "Comparative Literature",
112 category: "humanities",
113 },
114 QappCatalogEntry {
115 id: "creative_writing",
116 title: "Creative Writing",
117 category: "humanities",
118 },
119 QappCatalogEntry {
120 id: "dance",
121 title: "Dance",
122 category: "humanities",
123 },
124 QappCatalogEntry {
125 id: "english_language_and_literature",
126 title: "English Language And Literature",
127 category: "humanities",
128 },
129 QappCatalogEntry {
130 id: "ethics",
131 title: "Ethics",
132 category: "humanities",
133 },
134 QappCatalogEntry {
135 id: "film_and_media_studies",
136 title: "Film And Media Studies",
137 category: "humanities",
138 },
139 QappCatalogEntry {
140 id: "foreign_languages_and_literatures",
141 title: "Foreign Languages And Literatures",
142 category: "humanities",
143 },
144 QappCatalogEntry {
145 id: "linguistics",
146 title: "Linguistics",
147 category: "humanities",
148 },
149 QappCatalogEntry {
150 id: "music_history",
151 title: "Music History",
152 category: "humanities",
153 },
154 QappCatalogEntry {
155 id: "music_performance",
156 title: "Music Performance",
157 category: "humanities",
158 },
159 QappCatalogEntry {
160 id: "music_theory",
161 title: "Music Theory",
162 category: "humanities",
163 },
164 QappCatalogEntry {
165 id: "philosophy",
166 title: "Philosophy",
167 category: "humanities",
168 },
169 QappCatalogEntry {
170 id: "religion_and_theology",
171 title: "Religion And Theology",
172 category: "humanities",
173 },
174 QappCatalogEntry {
175 id: "studio_art",
176 title: "Studio Art",
177 category: "humanities",
178 },
179 QappCatalogEntry {
180 id: "theater_and_drama",
181 title: "Theater And Drama",
182 category: "humanities",
183 },
184 QappCatalogEntry {
185 id: "astronomy",
186 title: "Astronomy",
187 category: "natural-sciences",
188 },
189 QappCatalogEntry {
190 id: "astrophysics",
191 title: "Astrophysics",
192 category: "natural-sciences",
193 },
194 QappCatalogEntry {
195 id: "biology",
196 title: "Biology",
197 category: "natural-sciences",
198 },
199 QappCatalogEntry {
200 id: "botany",
201 title: "Botany",
202 category: "natural-sciences",
203 },
204 QappCatalogEntry {
205 id: "chemistry",
206 title: "Chemistry",
207 category: "natural-sciences",
208 },
209 QappCatalogEntry {
210 id: "earth_science",
211 title: "Earth Science",
212 category: "natural-sciences",
213 },
214 QappCatalogEntry {
215 id: "ecology",
216 title: "Ecology",
217 category: "natural-sciences",
218 },
219 QappCatalogEntry {
220 id: "environmental_science",
221 title: "Environmental Science",
222 category: "natural-sciences",
223 },
224 QappCatalogEntry {
225 id: "evolutionary_biology",
226 title: "Evolutionary Biology",
227 category: "natural-sciences",
228 },
229 QappCatalogEntry {
230 id: "geology",
231 title: "Geology",
232 category: "natural-sciences",
233 },
234 QappCatalogEntry {
235 id: "neuroscience",
236 title: "Neuroscience",
237 category: "natural-sciences",
238 },
239 QappCatalogEntry {
240 id: "oceanography",
241 title: "Oceanography",
242 category: "natural-sciences",
243 },
244 QappCatalogEntry {
245 id: "physics",
246 title: "Physics",
247 category: "natural-sciences",
248 },
249 QappCatalogEntry {
250 id: "zoology",
251 title: "Zoology",
252 category: "natural-sciences",
253 },
254 QappCatalogEntry {
255 id: "computer_science",
256 title: "Computer Science",
257 category: "formal-sciences",
258 },
259 QappCatalogEntry {
260 id: "logic",
261 title: "Logic",
262 category: "formal-sciences",
263 },
264 QappCatalogEntry {
265 id: "mathematics",
266 title: "Mathematics",
267 category: "formal-sciences",
268 },
269 QappCatalogEntry {
270 id: "statistics",
271 title: "Statistics",
272 category: "formal-sciences",
273 },
274 QappCatalogEntry {
275 id: "american_studies",
276 title: "American Studies",
277 category: "area-studies",
278 },
279 QappCatalogEntry {
280 id: "asian_studies",
281 title: "Asian Studies",
282 category: "area-studies",
283 },
284 QappCatalogEntry {
285 id: "cognitive_science",
286 title: "Cognitive Science",
287 category: "area-studies",
288 },
289 QappCatalogEntry {
290 id: "communication_studies",
291 title: "Communication Studies",
292 category: "area-studies",
293 },
294 QappCatalogEntry {
295 id: "european_studies",
296 title: "European Studies",
297 category: "area-studies",
298 },
299 QappCatalogEntry {
300 id: "folklore_and_mythology",
301 title: "Folklore And Mythology",
302 category: "area-studies",
303 },
304 QappCatalogEntry {
305 id: "global_studies",
306 title: "Global Studies",
307 category: "area-studies",
308 },
309 QappCatalogEntry {
310 id: "history_of_science_and_medicine",
311 title: "History Of Science And Medicine",
312 category: "area-studies",
313 },
314 QappCatalogEntry {
315 id: "indigenous_and_native_american_studies",
316 title: "Indigenous And Native American Studies",
317 category: "area-studies",
318 },
319 QappCatalogEntry {
320 id: "jewish_studies",
321 title: "Jewish Studies",
322 category: "area-studies",
323 },
324 QappCatalogEntry {
325 id: "latin_american_studies",
326 title: "Latin American Studies",
327 category: "area-studies",
328 },
329 QappCatalogEntry {
330 id: "medieval_and_renaissance_studies",
331 title: "Medieval And Renaissance Studies",
332 category: "area-studies",
333 },
334 QappCatalogEntry {
335 id: "middle_eastern_studies",
336 title: "Middle Eastern Studies",
337 category: "area-studies",
338 },
339 QappCatalogEntry {
340 id: "peace_and_conflict_studies",
341 title: "Peace And Conflict Studies",
342 category: "area-studies",
343 },
344 QappCatalogEntry {
345 id: "rhetoric_and_composition",
346 title: "Rhetoric And Composition",
347 category: "area-studies",
348 },
349 QappCatalogEntry {
350 id: "science_technology_and_society_sts",
351 title: "Science Technology And Society Sts",
352 category: "area-studies",
353 },
354 QappCatalogEntry {
355 id: "urban_studies",
356 title: "Urban Studies",
357 category: "area-studies",
358 },
359 QappCatalogEntry {
360 id: "criminology_and_criminal_justice",
361 title: "Criminology And Criminal Justice",
362 category: "applied-liberal-arts",
363 },
364 QappCatalogEntry {
365 id: "education_studies",
366 title: "Education Studies",
367 category: "applied-liberal-arts",
368 },
369 QappCatalogEntry {
370 id: "journalism",
371 title: "Journalism",
372 category: "applied-liberal-arts",
373 },
374 QappCatalogEntry {
375 id: "library_and_information_science",
376 title: "Library And Information Science",
377 category: "applied-liberal-arts",
378 },
379 QappCatalogEntry {
380 id: "museum_studies",
381 title: "Museum Studies",
382 category: "applied-liberal-arts",
383 },
384 QappCatalogEntry {
385 id: "public_health",
386 title: "Public Health",
387 category: "applied-liberal-arts",
388 },
389 QappCatalogEntry {
390 id: "public_policy",
391 title: "Public Policy",
392 category: "applied-liberal-arts",
393 },
394 QappCatalogEntry {
395 id: "african_studies",
396 title: "African Studies",
397 category: "emerging-interdisciplinary",
398 },
399 QappCatalogEntry {
400 id: "celtic_studies",
401 title: "Celtic Studies",
402 category: "emerging-interdisciplinary",
403 },
404 QappCatalogEntry {
405 id: "chicano_and_latino_studies",
406 title: "Chicano And Latino Studies",
407 category: "emerging-interdisciplinary",
408 },
409 QappCatalogEntry {
410 id: "digital_humanities",
411 title: "Digital Humanities",
412 category: "emerging-interdisciplinary",
413 },
414 QappCatalogEntry {
415 id: "disability_studies",
416 title: "Disability Studies",
417 category: "emerging-interdisciplinary",
418 },
419 QappCatalogEntry {
420 id: "environmental_humanities",
421 title: "Environmental Humanities",
422 category: "emerging-interdisciplinary",
423 },
424 QappCatalogEntry {
425 id: "ethnomusicology",
426 title: "Ethnomusicology",
427 category: "emerging-interdisciplinary",
428 },
429 QappCatalogEntry {
430 id: "food_studies",
431 title: "Food Studies",
432 category: "emerging-interdisciplinary",
433 },
434 QappCatalogEntry {
435 id: "game_studies",
436 title: "Game Studies",
437 category: "emerging-interdisciplinary",
438 },
439 QappCatalogEntry {
440 id: "human_rights_studies",
441 title: "Human Rights Studies",
442 category: "emerging-interdisciplinary",
443 },
444 QappCatalogEntry {
445 id: "medical_humanities",
446 title: "Medical Humanities",
447 category: "emerging-interdisciplinary",
448 },
449 QappCatalogEntry {
450 id: "oceanic_and_pacific_island_studies",
451 title: "Oceanic And Pacific Island Studies",
452 category: "emerging-interdisciplinary",
453 },
454 QappCatalogEntry {
455 id: "postcolonial_studies",
456 title: "Postcolonial Studies",
457 category: "emerging-interdisciplinary",
458 },
459 QappCatalogEntry {
460 id: "poverty_and_inequality_studies",
461 title: "Poverty And Inequality Studies",
462 category: "emerging-interdisciplinary",
463 },
464 QappCatalogEntry {
465 id: "queer_studies",
466 title: "Queer Studies",
467 category: "emerging-interdisciplinary",
468 },
469 QappCatalogEntry {
470 id: "scandinavian_studies",
471 title: "Scandinavian Studies",
472 category: "emerging-interdisciplinary",
473 },
474 QappCatalogEntry {
475 id: "slavic_studies",
476 title: "Slavic Studies",
477 category: "emerging-interdisciplinary",
478 },
479 QappCatalogEntry {
480 id: "sound_studies",
481 title: "Sound Studies",
482 category: "emerging-interdisciplinary",
483 },
484 QappCatalogEntry {
485 id: "sustainability_studies",
486 title: "Sustainability Studies",
487 category: "emerging-interdisciplinary",
488 },
489 QappCatalogEntry {
490 id: "translation_studies",
491 title: "Translation Studies",
492 category: "emerging-interdisciplinary",
493 },
494 QappCatalogEntry {
495 id: "visual_and_critical_studies",
496 title: "Visual And Critical Studies",
497 category: "emerging-interdisciplinary",
498 },
499 QappCatalogEntry {
500 id: "astrobiology",
501 title: "Astrobiology",
502 category: "social-sciences",
503 },
504 QappCatalogEntry {
505 id: "behavioral_economics",
506 title: "Behavioral Economics",
507 category: "social-sciences",
508 },
509 QappCatalogEntry {
510 id: "biomathematics",
511 title: "Biomathematics",
512 category: "social-sciences",
513 },
514 QappCatalogEntry {
515 id: "biophysics",
516 title: "Biophysics",
517 category: "social-sciences",
518 },
519 QappCatalogEntry {
520 id: "demography_and_population_studies",
521 title: "Demography And Population Studies",
522 category: "social-sciences",
523 },
524 QappCatalogEntry {
525 id: "geophysics",
526 title: "Geophysics",
527 category: "social-sciences",
528 },
529 QappCatalogEntry {
530 id: "planetary_science",
531 title: "Planetary Science",
532 category: "social-sciences",
533 },
534 QappCatalogEntry {
535 id: "political_economy",
536 title: "Political Economy",
537 category: "social-sciences",
538 },
539 QappCatalogEntry {
540 id: "social_psychology",
541 title: "Social Psychology",
542 category: "social-sciences",
543 },
544 QappCatalogEntry {
545 id: "art_conservation",
546 title: "Art Conservation",
547 category: "pre-professional",
548 },
549 QappCatalogEntry {
550 id: "arts_management_and_administration",
551 title: "Arts Management And Administration",
552 category: "pre-professional",
553 },
554 QappCatalogEntry {
555 id: "bioethics",
556 title: "Bioethics",
557 category: "pre-professional",
558 },
559 QappCatalogEntry {
560 id: "curatorial_studies",
561 title: "Curatorial Studies",
562 category: "pre-professional",
563 },
564 QappCatalogEntry {
565 id: "leadership_studies",
566 title: "Leadership Studies",
567 category: "pre-professional",
568 },
569 QappCatalogEntry {
570 id: "legal_studies",
571 title: "Legal Studies",
572 category: "pre-professional",
573 },
574 QappCatalogEntry {
575 id: "social_work",
576 title: "Social Work",
577 category: "pre-professional",
578 },
579 QappCatalogEntry {
580 id: "ancient_near_eastern_studies",
581 title: "Ancient Near Eastern Studies",
582 category: "language-regional",
583 },
584 QappCatalogEntry {
585 id: "appalachian_studies",
586 title: "Appalachian Studies",
587 category: "language-regional",
588 },
589 QappCatalogEntry {
590 id: "arctic_studies",
591 title: "Arctic Studies",
592 category: "language-regional",
593 },
594 QappCatalogEntry {
595 id: "balkan_studies",
596 title: "Balkan Studies",
597 category: "language-regional",
598 },
599 QappCatalogEntry {
600 id: "caribbean_studies",
601 title: "Caribbean Studies",
602 category: "language-regional",
603 },
604 QappCatalogEntry {
605 id: "central_asian_studies",
606 title: "Central Asian Studies",
607 category: "language-regional",
608 },
609 QappCatalogEntry {
610 id: "egyptology",
611 title: "Egyptology",
612 category: "language-regional",
613 },
614 QappCatalogEntry {
615 id: "francophone_studies",
616 title: "Francophone Studies",
617 category: "language-regional",
618 },
619 QappCatalogEntry {
620 id: "germanic_languages_and_literatures",
621 title: "Germanic Languages And Literatures",
622 category: "language-regional",
623 },
624 QappCatalogEntry {
625 id: "hispanic_and_luso_brazilian_studies",
626 title: "Hispanic And Luso Brazilian Studies",
627 category: "language-regional",
628 },
629 QappCatalogEntry {
630 id: "philology",
631 title: "Philology",
632 category: "language-regional",
633 },
634 QappCatalogEntry {
635 id: "romance_languages_and_literatures",
636 title: "Romance Languages And Literatures",
637 category: "language-regional",
638 },
639 QappCatalogEntry {
640 id: "south_asian_studies",
641 title: "South Asian Studies",
642 category: "language-regional",
643 },
644 QappCatalogEntry {
645 id: "southeast_asian_studies",
646 title: "Southeast Asian Studies",
647 category: "language-regional",
648 },
649 QappCatalogEntry {
650 id: "animation_and_digital_arts",
651 title: "Animation And Digital Arts",
652 category: "arts-performance",
653 },
654 QappCatalogEntry {
655 id: "book_arts_and_papermaking",
656 title: "Book Arts And Papermaking",
657 category: "arts-performance",
658 },
659 QappCatalogEntry {
660 id: "ceramics",
661 title: "Ceramics",
662 category: "arts-performance",
663 },
664 QappCatalogEntry {
665 id: "cinematography",
666 title: "Cinematography",
667 category: "arts-performance",
668 },
669 QappCatalogEntry {
670 id: "dramaturgy",
671 title: "Dramaturgy",
672 category: "arts-performance",
673 },
674 QappCatalogEntry {
675 id: "musicology",
676 title: "Musicology",
677 category: "arts-performance",
678 },
679 QappCatalogEntry {
680 id: "photography",
681 title: "Photography",
682 category: "arts-performance",
683 },
684 QappCatalogEntry {
685 id: "playwriting",
686 title: "Playwriting",
687 category: "arts-performance",
688 },
689 QappCatalogEntry {
690 id: "printmaking",
691 title: "Printmaking",
692 category: "arts-performance",
693 },
694 QappCatalogEntry {
695 id: "screenwriting",
696 title: "Screenwriting",
697 category: "arts-performance",
698 },
699 QappCatalogEntry {
700 id: "sculpture",
701 title: "Sculpture",
702 category: "arts-performance",
703 },
704 QappCatalogEntry {
705 id: "applied_linguistics",
706 title: "Applied Linguistics",
707 category: "advanced-subdisciplines",
708 },
709 QappCatalogEntry {
710 id: "family_studies",
711 title: "Family Studies",
712 category: "advanced-subdisciplines",
713 },
714 QappCatalogEntry {
715 id: "gerontology",
716 title: "Gerontology",
717 category: "advanced-subdisciplines",
718 },
719 QappCatalogEntry {
720 id: "penology",
721 title: "Penology",
722 category: "advanced-subdisciplines",
723 },
724 QappCatalogEntry {
725 id: "psycholinguistics",
726 title: "Psycholinguistics",
727 category: "advanced-subdisciplines",
728 },
729 QappCatalogEntry {
730 id: "social_and_cultural_analysis",
731 title: "Social And Cultural Analysis",
732 category: "advanced-subdisciplines",
733 },
734 QappCatalogEntry {
735 id: "sociolinguistics",
736 title: "Sociolinguistics",
737 category: "advanced-subdisciplines",
738 },
739 QappCatalogEntry {
740 id: "atmospheric_science",
741 title: "Atmospheric Science",
742 category: "niche-sciences",
743 },
744 QappCatalogEntry {
745 id: "behavioral_ecology",
746 title: "Behavioral Ecology",
747 category: "niche-sciences",
748 },
749 QappCatalogEntry {
750 id: "kinesiology_and_movement_studies",
751 title: "Kinesiology And Movement Studies",
752 category: "niche-sciences",
753 },
754 QappCatalogEntry {
755 id: "marine_biology",
756 title: "Marine Biology",
757 category: "niche-sciences",
758 },
759 QappCatalogEntry {
760 id: "materials_science",
761 title: "Materials Science",
762 category: "niche-sciences",
763 },
764 QappCatalogEntry {
765 id: "meteorology",
766 title: "Meteorology",
767 category: "niche-sciences",
768 },
769 QappCatalogEntry {
770 id: "mycology",
771 title: "Mycology",
772 category: "niche-sciences",
773 },
774 QappCatalogEntry {
775 id: "paleontology",
776 title: "Paleontology",
777 category: "niche-sciences",
778 },
779 QappCatalogEntry {
780 id: "sports_studies",
781 title: "Sports Studies",
782 category: "niche-sciences",
783 },
784 QappCatalogEntry {
785 id: "aesthetics",
786 title: "Aesthetics",
787 category: "philosophy-theory",
788 },
789 QappCatalogEntry {
790 id: "epistemology",
791 title: "Epistemology",
792 category: "philosophy-theory",
793 },
794 QappCatalogEntry {
795 id: "metaphysics",
796 title: "Metaphysics",
797 category: "philosophy-theory",
798 },
799 QappCatalogEntry {
800 id: "phenomenology",
801 title: "Phenomenology",
802 category: "philosophy-theory",
803 },
804 QappCatalogEntry {
805 id: "philosophy_of_mind",
806 title: "Philosophy Of Mind",
807 category: "philosophy-theory",
808 },
809 QappCatalogEntry {
810 id: "philosophy_of_religion",
811 title: "Philosophy Of Religion",
812 category: "philosophy-theory",
813 },
814 QappCatalogEntry {
815 id: "philosophy_of_science",
816 title: "Philosophy Of Science",
817 category: "philosophy-theory",
818 },
819 QappCatalogEntry {
820 id: "social_and_political_philosophy",
821 title: "Social And Political Philosophy",
822 category: "philosophy-theory",
823 },
824 QappCatalogEntry {
825 id: "biblical_studies",
826 title: "Biblical Studies",
827 category: "religious-studies",
828 },
829 QappCatalogEntry {
830 id: "buddhist_studies",
831 title: "Buddhist Studies",
832 category: "religious-studies",
833 },
834 QappCatalogEntry {
835 id: "canon_law",
836 title: "Canon Law",
837 category: "religious-studies",
838 },
839 QappCatalogEntry {
840 id: "hindu_studies",
841 title: "Hindu Studies",
842 category: "religious-studies",
843 },
844 QappCatalogEntry {
845 id: "islamic_studies",
846 title: "Islamic Studies",
847 category: "religious-studies",
848 },
849 QappCatalogEntry {
850 id: "missiology",
851 title: "Missiology",
852 category: "religious-studies",
853 },
854 QappCatalogEntry {
855 id: "patristics",
856 title: "Patristics",
857 category: "religious-studies",
858 },
859 QappCatalogEntry {
860 id: "arthurian_studies",
861 title: "Arthurian Studies",
862 category: "literary-media",
863 },
864 QappCatalogEntry {
865 id: "comics_and_graphic_novel_studies",
866 title: "Comics And Graphic Novel Studies",
867 category: "literary-media",
868 },
869 QappCatalogEntry {
870 id: "fan_studies",
871 title: "Fan Studies",
872 category: "literary-media",
873 },
874 QappCatalogEntry {
875 id: "poetry_and_poetics",
876 title: "Poetry And Poetics",
877 category: "literary-media",
878 },
879 QappCatalogEntry {
880 id: "science_fiction_and_fantasy_studies",
881 title: "Science Fiction And Fantasy Studies",
882 category: "literary-media",
883 },
884 QappCatalogEntry {
885 id: "utopian_studies",
886 title: "Utopian Studies",
887 category: "literary-media",
888 },
889 QappCatalogEntry {
890 id: "historical_linguistics",
891 title: "Historical Linguistics",
892 category: "linguistics-semiotics",
893 },
894 QappCatalogEntry {
895 id: "morphology",
896 title: "Morphology",
897 category: "linguistics-semiotics",
898 },
899 QappCatalogEntry {
900 id: "pragmatics",
901 title: "Pragmatics",
902 category: "linguistics-semiotics",
903 },
904 QappCatalogEntry {
905 id: "semantics",
906 title: "Semantics",
907 category: "linguistics-semiotics",
908 },
909 QappCatalogEntry {
910 id: "semiotics",
911 title: "Semiotics",
912 category: "linguistics-semiotics",
913 },
914 QappCatalogEntry {
915 id: "syntax",
916 title: "Syntax",
917 category: "linguistics-semiotics",
918 },
919 QappCatalogEntry {
920 id: "disaster_studies",
921 title: "Disaster Studies",
922 category: "intersectional-applied",
923 },
924 QappCatalogEntry {
925 id: "futures_studies_and_foresight",
926 title: "Futures Studies And Foresight",
927 category: "intersectional-applied",
928 },
929 QappCatalogEntry {
930 id: "leisure_studies",
931 title: "Leisure Studies",
932 category: "intersectional-applied",
933 },
934 QappCatalogEntry {
935 id: "philanthropy_and_nonprofit_studies",
936 title: "Philanthropy And Nonprofit Studies",
937 category: "intersectional-applied",
938 },
939 QappCatalogEntry {
940 id: "architectural_history",
941 title: "Architectural History",
942 category: "historical-textual",
943 },
944 QappCatalogEntry {
945 id: "childrens_literature",
946 title: "Childrens Literature",
947 category: "historical-textual",
948 },
949 QappCatalogEntry {
950 id: "history_of_art_and_architecture",
951 title: "History Of Art And Architecture",
952 category: "historical-textual",
953 },
954 QappCatalogEntry {
955 id: "intellectual_history",
956 title: "Intellectual History",
957 category: "historical-textual",
958 },
959 QappCatalogEntry {
960 id: "maritime_history",
961 title: "Maritime History",
962 category: "historical-textual",
963 },
964 QappCatalogEntry {
965 id: "military_history",
966 title: "Military History",
967 category: "historical-textual",
968 },
969 QappCatalogEntry {
970 id: "oral_history",
971 title: "Oral History",
972 category: "historical-textual",
973 },
974 QappCatalogEntry {
975 id: "paleography",
976 title: "Paleography",
977 category: "historical-textual",
978 },
979 QappCatalogEntry {
980 id: "public_history",
981 title: "Public History",
982 category: "historical-textual",
983 },
984 QappCatalogEntry {
985 id: "textual_criticism",
986 title: "Textual Criticism",
987 category: "historical-textual",
988 },
989 QappCatalogEntry {
990 id: "animal_studies_human_animal_studies",
991 title: "Animal Studies Human Animal Studies",
992 category: "critical-cultural",
993 },
994 QappCatalogEntry {
995 id: "body_studies",
996 title: "Body Studies",
997 category: "critical-cultural",
998 },
999 QappCatalogEntry {
1000 id: "critical_race_and_ethnic_studies",
1001 title: "Critical Race And Ethnic Studies",
1002 category: "critical-cultural",
1003 },
1004 QappCatalogEntry {
1005 id: "critical_theory",
1006 title: "Critical Theory",
1007 category: "critical-cultural",
1008 },
1009 QappCatalogEntry {
1010 id: "deaf_studies",
1011 title: "Deaf Studies",
1012 category: "critical-cultural",
1013 },
1014 QappCatalogEntry {
1015 id: "diaspora_studies",
1016 title: "Diaspora Studies",
1017 category: "critical-cultural",
1018 },
1019 QappCatalogEntry {
1020 id: "fat_studies",
1021 title: "Fat Studies",
1022 category: "critical-cultural",
1023 },
1024 QappCatalogEntry {
1025 id: "indigenous_language_revitalization",
1026 title: "Indigenous Language Revitalization",
1027 category: "critical-cultural",
1028 },
1029 QappCatalogEntry {
1030 id: "material_culture_studies",
1031 title: "Material Culture Studies",
1032 category: "critical-cultural",
1033 },
1034 QappCatalogEntry {
1035 id: "memory_studies",
1036 title: "Memory Studies",
1037 category: "critical-cultural",
1038 },
1039 QappCatalogEntry {
1040 id: "whiteness_studies",
1041 title: "Whiteness Studies",
1042 category: "critical-cultural",
1043 },
1044 QappCatalogEntry {
1045 id: "biogeochemistry",
1046 title: "Biogeochemistry",
1047 category: "interdisciplinary-stem",
1048 },
1049 QappCatalogEntry {
1050 id: "bioinformatics",
1051 title: "Bioinformatics",
1052 category: "interdisciplinary-stem",
1053 },
1054 QappCatalogEntry {
1055 id: "chemical_physics",
1056 title: "Chemical Physics",
1057 category: "interdisciplinary-stem",
1058 },
1059 QappCatalogEntry {
1060 id: "computational_linguistics",
1061 title: "Computational Linguistics",
1062 category: "interdisciplinary-stem",
1063 },
1064 QappCatalogEntry {
1065 id: "cryptography",
1066 title: "Cryptography",
1067 category: "interdisciplinary-stem",
1068 },
1069 QappCatalogEntry {
1070 id: "environmental_chemistry",
1071 title: "Environmental Chemistry",
1072 category: "interdisciplinary-stem",
1073 },
1074 QappCatalogEntry {
1075 id: "geochemistry",
1076 title: "Geochemistry",
1077 category: "interdisciplinary-stem",
1078 },
1079 QappCatalogEntry {
1080 id: "mathematical_biology",
1081 title: "Mathematical Biology",
1082 category: "interdisciplinary-stem",
1083 },
1084 QappCatalogEntry {
1085 id: "mathematical_economics",
1086 title: "Mathematical Economics",
1087 category: "interdisciplinary-stem",
1088 },
1089 QappCatalogEntry {
1090 id: "systems_biology",
1091 title: "Systems Biology",
1092 category: "interdisciplinary-stem",
1093 },
1094 QappCatalogEntry {
1095 id: "architectural_studies",
1096 title: "Architectural Studies",
1097 category: "design-spatial",
1098 },
1099 QappCatalogEntry {
1100 id: "cyberculture_studies",
1101 title: "Cyberculture Studies",
1102 category: "design-spatial",
1103 },
1104 QappCatalogEntry {
1105 id: "environmental_design",
1106 title: "Environmental Design",
1107 category: "design-spatial",
1108 },
1109 QappCatalogEntry {
1110 id: "landscape_studies",
1111 title: "Landscape Studies",
1112 category: "design-spatial",
1113 },
1114 QappCatalogEntry {
1115 id: "media_ecology",
1116 title: "Media Ecology",
1117 category: "design-spatial",
1118 },
1119 QappCatalogEntry {
1120 id: "spatial_data_science",
1121 title: "Spatial Data Science",
1122 category: "design-spatial",
1123 },
1124 QappCatalogEntry {
1125 id: "urban_ecology",
1126 title: "Urban Ecology",
1127 category: "design-spatial",
1128 },
1129 QappCatalogEntry {
1130 id: "urban_planning_and_design",
1131 title: "Urban Planning And Design",
1132 category: "design-spatial",
1133 },
1134 QappCatalogEntry {
1135 id: "affect_theory",
1136 title: "Affect Theory",
1137 category: "critical-theory",
1138 },
1139 QappCatalogEntry {
1140 id: "biopolitics",
1141 title: "Biopolitics",
1142 category: "critical-theory",
1143 },
1144 QappCatalogEntry {
1145 id: "capital_studies",
1146 title: "Capital Studies",
1147 category: "critical-theory",
1148 },
1149 QappCatalogEntry {
1150 id: "critical_disability_studies",
1151 title: "Critical Disability Studies",
1152 category: "critical-theory",
1153 },
1154 QappCatalogEntry {
1155 id: "critical_film_studies",
1156 title: "Critical Film Studies",
1157 category: "critical-theory",
1158 },
1159 QappCatalogEntry {
1160 id: "critical_gentrification_studies",
1161 title: "Critical Gentrification Studies",
1162 category: "critical-theory",
1163 },
1164 QappCatalogEntry {
1165 id: "cultural_ecology",
1166 title: "Cultural Ecology",
1167 category: "critical-theory",
1168 },
1169 QappCatalogEntry {
1170 id: "decolonial_studies",
1171 title: "Decolonial Studies",
1172 category: "critical-theory",
1173 },
1174 QappCatalogEntry {
1175 id: "eco_critical_theory",
1176 title: "Eco Critical Theory",
1177 category: "critical-theory",
1178 },
1179 QappCatalogEntry {
1180 id: "eco_feminism",
1181 title: "Eco Feminism",
1182 category: "critical-theory",
1183 },
1184 QappCatalogEntry {
1185 id: "eco_queer_theory",
1186 title: "Eco Queer Theory",
1187 category: "critical-theory",
1188 },
1189 QappCatalogEntry {
1190 id: "environmental_justice",
1191 title: "Environmental Justice",
1192 category: "critical-theory",
1193 },
1194 QappCatalogEntry {
1195 id: "film_philosophy",
1196 title: "Film Philosophy",
1197 category: "critical-theory",
1198 },
1199 QappCatalogEntry {
1200 id: "gender_studies",
1201 title: "Gender Studies",
1202 category: "critical-theory",
1203 },
1204 QappCatalogEntry {
1205 id: "global_critical_studies",
1206 title: "Global Critical Studies",
1207 category: "critical-theory",
1208 },
1209 QappCatalogEntry {
1210 id: "grassroots_studies",
1211 title: "Grassroots Studies",
1212 category: "critical-theory",
1213 },
1214 QappCatalogEntry {
1215 id: "grief_studies",
1216 title: "Grief Studies",
1217 category: "critical-theory",
1218 },
1219 QappCatalogEntry {
1220 id: "haunted_humanities",
1221 title: "Haunted Humanities",
1222 category: "critical-theory",
1223 },
1224 QappCatalogEntry {
1225 id: "hermeneutics",
1226 title: "Hermeneutics",
1227 category: "critical-theory",
1228 },
1229 QappCatalogEntry {
1230 id: "historiography",
1231 title: "Historiography",
1232 category: "critical-theory",
1233 },
1234 QappCatalogEntry {
1235 id: "ideology_critique",
1236 title: "Ideology Critique",
1237 category: "critical-theory",
1238 },
1239 QappCatalogEntry {
1240 id: "indigenous_feminisms",
1241 title: "Indigenous Feminisms",
1242 category: "critical-theory",
1243 },
1244 QappCatalogEntry {
1245 id: "integral_studies",
1246 title: "Integral Studies",
1247 category: "critical-theory",
1248 },
1249 QappCatalogEntry {
1250 id: "intermedia_studies",
1251 title: "Intermedia Studies",
1252 category: "critical-theory",
1253 },
1254 QappCatalogEntry {
1255 id: "landscape_phenomenology",
1256 title: "Landscape Phenomenology",
1257 category: "critical-theory",
1258 },
1259 QappCatalogEntry {
1260 id: "liberation_studies",
1261 title: "Liberation Studies",
1262 category: "critical-theory",
1263 },
1264 QappCatalogEntry {
1265 id: "literature_and_law",
1266 title: "Literature And Law",
1267 category: "critical-theory",
1268 },
1269 QappCatalogEntry {
1270 id: "materialist_aesthetics",
1271 title: "Materialist Aesthetics",
1272 category: "critical-theory",
1273 },
1274 QappCatalogEntry {
1275 id: "media_theory",
1276 title: "Media Theory",
1277 category: "critical-theory",
1278 },
1279 QappCatalogEntry {
1280 id: "metamodernism",
1281 title: "Metamodernism",
1282 category: "critical-theory",
1283 },
1284 QappCatalogEntry {
1285 id: "post_critical_pedagogy",
1286 title: "Post Critical Pedagogy",
1287 category: "critical-theory",
1288 },
1289 QappCatalogEntry {
1290 id: "posthumanities",
1291 title: "Posthumanities",
1292 category: "critical-theory",
1293 },
1294 QappCatalogEntry {
1295 id: "poststructuralism",
1296 title: "Poststructuralism",
1297 category: "critical-theory",
1298 },
1299 QappCatalogEntry {
1300 id: "psychoanalysis",
1301 title: "Psychoanalysis",
1302 category: "critical-theory",
1303 },
1304 QappCatalogEntry {
1305 id: "queer_cinema_studies",
1306 title: "Queer Cinema Studies",
1307 category: "critical-theory",
1308 },
1309 QappCatalogEntry {
1310 id: "queer_theory",
1311 title: "Queer Theory",
1312 category: "critical-theory",
1313 },
1314 QappCatalogEntry {
1315 id: "race_critical_theory",
1316 title: "Race Critical Theory",
1317 category: "critical-theory",
1318 },
1319 QappCatalogEntry {
1320 id: "race_studies",
1321 title: "Race Studies",
1322 category: "critical-theory",
1323 },
1324 QappCatalogEntry {
1325 id: "race_theory",
1326 title: "Race Theory",
1327 category: "critical-theory",
1328 },
1329 QappCatalogEntry {
1330 id: "radical_media_studies",
1331 title: "Radical Media Studies",
1332 category: "critical-theory",
1333 },
1334 QappCatalogEntry {
1335 id: "regionalism",
1336 title: "Regionalism",
1337 category: "critical-theory",
1338 },
1339 QappCatalogEntry {
1340 id: "revisionist_critical_theory",
1341 title: "Revisionist Critical Theory",
1342 category: "critical-theory",
1343 },
1344 QappCatalogEntry {
1345 id: "rural_studies",
1346 title: "Rural Studies",
1347 category: "critical-theory",
1348 },
1349 QappCatalogEntry {
1350 id: "screen_philosophy",
1351 title: "Screen Philosophy",
1352 category: "critical-theory",
1353 },
1354 QappCatalogEntry {
1355 id: "site_specificity_theory",
1356 title: "Site Specificity Theory",
1357 category: "critical-theory",
1358 },
1359 QappCatalogEntry {
1360 id: "social_activism",
1361 title: "Social Activism",
1362 category: "critical-theory",
1363 },
1364 QappCatalogEntry {
1365 id: "soft_skills_theory",
1366 title: "Soft Skills Theory",
1367 category: "critical-theory",
1368 },
1369 QappCatalogEntry {
1370 id: "spinoza_studies",
1371 title: "Spinoza Studies",
1372 category: "critical-theory",
1373 },
1374 QappCatalogEntry {
1375 id: "structuralism",
1376 title: "Structuralism",
1377 category: "critical-theory",
1378 },
1379 QappCatalogEntry {
1380 id: "trauma_studies",
1381 title: "Trauma Studies",
1382 category: "critical-theory",
1383 },
1384 QappCatalogEntry {
1385 id: "urban_theory",
1386 title: "Urban Theory",
1387 category: "critical-theory",
1388 },
1389 QappCatalogEntry {
1390 id: "visual_studies",
1391 title: "Visual Studies",
1392 category: "critical-theory",
1393 },
1394 QappCatalogEntry {
1395 id: "vital_materialism",
1396 title: "Vital Materialism",
1397 category: "critical-theory",
1398 },
1399 QappCatalogEntry {
1400 id: "white_studies",
1401 title: "White Studies",
1402 category: "critical-theory",
1403 },
1404];
1405
1406pub fn catalogue_categories() -> Vec<&'static str> {
1408 let mut cats: Vec<&str> = STUDIO_QAPP_CATALOG.iter().map(|e| e.category).collect();
1409 cats.sort_unstable();
1410 cats.dedup();
1411 cats
1412}
1413
1414pub fn category_label(slug: &str) -> String {
1416 match slug {
1417 "social-sciences" => "Social Sciences".into(),
1418 "humanities" => "Humanities".into(),
1419 "natural-sciences" => "Natural Sciences".into(),
1420 "formal-sciences" => "Formal Sciences".into(),
1421 "area-studies" => "Area Studies".into(),
1422 "applied-liberal-arts" => "Applied Liberal Arts".into(),
1423 "emerging-interdisciplinary" => "Emerging Interdisciplinary".into(),
1424 "specialized-sciences" => "Specialized Sciences".into(),
1425 "pre-professional" => "Pre-Professional".into(),
1426 "language-regional" => "Language & Regional".into(),
1427 "arts-performance" => "Arts & Performance".into(),
1428 "advanced-subdisciplines" => "Advanced Sub-disciplines".into(),
1429 "niche-sciences" => "Niche Sciences".into(),
1430 "philosophy-theory" => "Philosophy & Theory".into(),
1431 "religious-studies" => "Religious Studies".into(),
1432 "literary-media" => "Literary & Media".into(),
1433 "linguistics-semiotics" => "Linguistics & Semiotics".into(),
1434 "intersectional-applied" => "Intersectional & Applied".into(),
1435 "historical-textual" => "Historical & Textual".into(),
1436 "critical-cultural" => "Critical & Cultural".into(),
1437 "interdisciplinary-stem" => "Interdisciplinary STEM".into(),
1438 "design-spatial" => "Design & Spatial".into(),
1439 "critical-theory" => "Critical Theory".into(),
1440 "platform" => "Platform".into(),
1441 "website" => "Websites".into(),
1442 other => other.replace('-', " "),
1443 }
1444}
1445
1446fn primary_subject_for_uri(uri: &str) -> u64 {
1447 const FNV_OFFSET: u64 = 0xcbf2_9ce4_8422_2325;
1449 const FNV_PRIME: u64 = 0x100_0000_01b3;
1450 let mut h = FNV_OFFSET;
1451 for b in uri.as_bytes() {
1452 h ^= u64::from(*b);
1453 h = h.wrapping_mul(FNV_PRIME);
1454 }
1455 h & 0x0FFF_FFFF_FFFF_FFFF
1456}
1457
1458pub fn catalog_entry_to_library(entry: QappCatalogEntry, now: u64) -> LibraryEntry {
1460 let uri = entry.asset_uri();
1461 let mut le = LibraryEntry {
1462 asset_uri: uri.clone(),
1463 primary_subject: primary_subject_for_uri(&uri),
1464 media_type: QAPP_MEDIA_TYPE.into(),
1465 quins: Vec::new(),
1466 topics: vec![
1467 "qapp".into(),
1468 "academic".into(),
1469 entry.category.into(),
1470 entry.id.replace('_', "-"),
1471 ],
1472 projects: vec![format!("category:{}", entry.category)],
1473 purposes: vec!["qapp".into(), "software".into(), "academic".into()],
1474 place: None,
1475 occurred_at: None,
1476 lat: None,
1477 lon: None,
1478 flags: Vec::new(),
1479 ingested_unix: now,
1480 excerpt: format!(
1481 "{} — studio QApp ({}). Early liberal-arts pane; catalogued for Software browse.",
1482 entry.title,
1483 category_label(entry.category)
1484 ),
1485 sensitivity: "public".into(),
1486 section: LibrarySection::Software.as_str().into(),
1487 commons_visibility: CommonsVisibility::None,
1488 cml_signals: Vec::new(),
1489 cml_concept_count: 0,
1490 cml_n3: String::new(),
1491 cof_html: String::new(),
1492 cof_segment_count: 0,
1493 cof_segment_index: 0,
1494 cof_profile: String::new(),
1495 };
1496 le.recompute_section();
1497 le
1498}
1499
1500#[derive(Debug, Clone, Serialize, Deserialize)]
1502pub struct QappSeedReport {
1503 pub total_catalog: usize,
1504 pub added: usize,
1505 pub updated: usize,
1506 pub categories: usize,
1507}
1508
1509pub fn seed_studio_qapps_into_library(store: &HypermediaStore) -> std::io::Result<QappSeedReport> {
1513 let now = std::time::SystemTime::now()
1514 .duration_since(std::time::UNIX_EPOCH)
1515 .map(|d| d.as_secs())
1516 .unwrap_or(0);
1517 let mut entries = store.load()?;
1518 let mut by_uri: std::collections::HashMap<String, usize> = entries
1519 .iter()
1520 .enumerate()
1521 .map(|(i, e)| (e.asset_uri.clone(), i))
1522 .collect();
1523 let mut added = 0usize;
1524 let mut updated = 0usize;
1525 for row in STUDIO_QAPP_CATALOG {
1526 let uri = row.asset_uri();
1527 let mut entry = catalog_entry_to_library(*row, now);
1528 if let Some(&idx) = by_uri.get(&uri) {
1529 entry.ingested_unix = entries[idx].ingested_unix;
1530 entries[idx] = entry;
1531 updated += 1;
1532 } else {
1533 by_uri.insert(uri, entries.len());
1534 entries.push(entry);
1535 added += 1;
1536 }
1537 }
1538 store.replace_all(&entries)?;
1539 Ok(QappSeedReport {
1540 total_catalog: STUDIO_QAPP_CATALOG.len(),
1541 added,
1542 updated,
1543 categories: catalogue_categories().len(),
1544 })
1545}
1546
1547#[cfg(test)]
1548mod tests {
1549 use super::*;
1550
1551 #[test]
1552 fn catalog_is_nonempty_and_categorised() {
1553 assert!(STUDIO_QAPP_CATALOG.len() >= 200);
1554 assert!(catalogue_categories().len() >= 10);
1555 for e in STUDIO_QAPP_CATALOG {
1556 assert!(!e.id.is_empty());
1557 assert!(!e.category.is_empty());
1558 assert!(!e.asset_uri().is_empty());
1559 }
1560 }
1561
1562 #[test]
1563 fn seed_is_idempotent_and_software_section() {
1564 let dir = tempfile::tempdir().unwrap();
1565 let store = HypermediaStore::open(dir.path()).unwrap();
1566 let r1 = seed_studio_qapps_into_library(&store).unwrap();
1567 assert_eq!(r1.added, STUDIO_QAPP_CATALOG.len());
1568 assert_eq!(r1.updated, 0);
1569 let soft = store.by_section(LibrarySection::Software).unwrap();
1570 assert_eq!(soft.len(), STUDIO_QAPP_CATALOG.len());
1571 assert!(soft.iter().all(|e| e.media_type == QAPP_MEDIA_TYPE));
1572 let r2 = seed_studio_qapps_into_library(&store).unwrap();
1573 assert_eq!(r2.added, 0);
1574 assert_eq!(r2.updated, STUDIO_QAPP_CATALOG.len());
1575 assert_eq!(
1576 store.by_section(LibrarySection::Software).unwrap().len(),
1577 STUDIO_QAPP_CATALOG.len()
1578 );
1579 }
1580}