aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2017-02-07 20:24:02 +0100
committerJoris2017-02-14 16:21:48 +0100
commitf9bc96bbb095e252b7a8eeefec6f053456989858 (patch)
tree85ad2c163037b961bbdb6a9ff0d1cfc5d7e8b143
parentb2b7091c90570945b9ba525867eb9b7a246fa1a3 (diff)
Group themes
-rw-r--r--src/main/scala/reading/Books.scala232
-rw-r--r--src/main/scala/reading/component/index/Menu.scala13
-rw-r--r--src/main/scala/reading/models/Filter.scala5
-rw-r--r--src/main/scala/reading/models/FilterFactory.scala10
-rw-r--r--src/main/scala/reading/models/FilterKind.scala1
-rw-r--r--src/main/scala/reading/models/Genre.scala6
-rw-r--r--src/main/scala/reading/models/GroupedTheme.scala43
-rw-r--r--src/main/scala/reading/models/Period.scala4
-rw-r--r--src/main/scala/reading/models/Theme.scala59
9 files changed, 231 insertions, 142 deletions
diff --git a/src/main/scala/reading/Books.scala b/src/main/scala/reading/Books.scala
index 1eeecc6..9dd8bed 100644
--- a/src/main/scala/reading/Books.scala
+++ b/src/main/scala/reading/Books.scala
@@ -39,7 +39,7 @@ object Books {
parts = 5,
period = Some(Contemporain),
genres = Seq(Policier),
- themes = Seq(VieNocturne),
+ themes = Seq(Americain),
programs = Seq(),
level = Difficile
),
@@ -50,8 +50,8 @@ object Books {
year = "2011-2016",
parts = 9,
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Amitie, Fratrie),
+ genres = Seq(Roman),
+ themes = Seq(Amitie, Famille),
programs = Seq(),
level = Moyen
),
@@ -61,7 +61,7 @@ object Books {
author = "Stephen CHBOSKY",
year = "2012",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Conflit),
programs = Seq(),
level = Moyen
@@ -72,7 +72,7 @@ object Books {
author = "Jenny DOWNHAM",
year = "2011",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour, Adolescence, Maladie),
programs = Seq(),
level = Difficile
@@ -83,7 +83,7 @@ object Books {
author = "John GREEN",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour, Adolescence, Maladie),
programs = Seq(),
level = Moyen
@@ -107,7 +107,7 @@ object Books {
year = "2000-2003",
parts = 4,
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Amour, Famille, Adolescence),
programs = Seq(Autrui),
level = Moyen
@@ -118,7 +118,7 @@ object Books {
author = "Jacqueline WILSON",
year = "2009",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Famille, Amour),
programs = Seq(Autrui),
level = Moyen
@@ -152,8 +152,8 @@ object Books {
author = "J-C MOURLEVAT et Vincent DUTRAIT",
year = "2010",
period = None,
- genres = Seq(),
- themes = Seq(Aventure, Fratrie),
+ genres = Seq(Roman),
+ themes = Seq(Aventure, Famille),
programs = Seq(RecitAventure),
level = Facile
),
@@ -267,7 +267,7 @@ object Books {
year = "2004",
period = Some(Siecle20),
genres = Seq(RomanHistorique),
- themes = Seq(Guerre, Fratrie),
+ themes = Seq(Guerre, Famille),
programs = Seq(),
level = Moyen
),
@@ -492,7 +492,7 @@ object Books {
author = "C.S LEWIS",
year = "2002-2008",
period = None,
- genres = Seq(),
+ genres = Seq(Fantasy),
themes = Seq(Aventure, Famille),
programs = Seq(),
level = Moyen
@@ -663,9 +663,9 @@ object Books {
author = "Mary SHELLEY",
year = "1818",
period = None,
- genres = Seq(Fantastique),
- themes = Seq(Peur),
- programs = Seq(),
+ genres = Seq(SF),
+ themes = Seq(Monstrueux),
+ programs = Seq(Monstre),
level = Moyen
),
@@ -674,7 +674,7 @@ object Books {
author = "FRIGIEL et Nicolas DIGARD",
year = "2016",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Magie, Famille, Aventure),
programs = Seq(),
level = Moyen
@@ -685,7 +685,7 @@ object Books {
author = "Robert MUCHAMORE",
year = "2009-2016",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Espionnage, Americain),
programs = Seq(),
level = Moyen
@@ -696,7 +696,7 @@ object Books {
author = "Estelle MASKAME",
year = "2016",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour, Famille, Adolescence),
programs = Seq(),
level = Moyen
@@ -808,7 +808,7 @@ object Books {
author = "GOSCINNY et SEMPE",
year = "1973",
period = Some(Siecle20),
- genres = Seq(),
+ genres = Seq(Comique),
themes = Seq(Amitie, Ecole, Famille),
programs = Seq(),
level = Facile
@@ -820,7 +820,7 @@ object Books {
year = "2008-2016",
period = Some(Contemporain),
genres = Seq(BD),
- themes = Seq(Fratrie, College),
+ themes = Seq(Famille, College),
programs = Seq(),
level = Facile
),
@@ -854,7 +854,7 @@ object Books {
year = "2010",
parts = 2,
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Famille, Nature, Aventure, Amour),
programs = Seq(),
level = Difficile
@@ -865,7 +865,7 @@ object Books {
author = "E.R LINK",
year = "2016",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Aventure, Pirate, Amour, Amitie),
programs = Seq(),
level = Difficile
@@ -901,7 +901,7 @@ object Books {
year = "2012-2014",
parts = 5,
period = None,
- genres = Seq(),
+ genres = Seq(RomanAventure, Fantasy),
themes = Seq(Famille, Nature, Aventure, Poetique),
programs = Seq(RecitAventure),
level = Facile
@@ -937,7 +937,7 @@ object Books {
year = "2013-2016",
parts = 9,
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Amour, Adolescence),
programs = Seq(),
level = Moyen
@@ -948,9 +948,9 @@ object Books {
author = "Jonathan STROUD",
year = "2003-2006",
parts = 3,
- period = None,
+ period = Some(Siecle19),
genres = Seq(Fantasy),
- themes = Seq(Histoire, Magie),
+ themes = Seq(Humour, Magie),
programs = Seq(),
level = Difficile
),
@@ -960,7 +960,7 @@ object Books {
author = "Fleur FERRIS",
year = "2016",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Internet, Enquete),
programs = Seq(),
level = Moyen
@@ -995,7 +995,7 @@ object Books {
author = "Daniel PENNAC",
year = "1989",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Animal),
programs = Seq(),
level = Facile
@@ -1006,7 +1006,7 @@ object Books {
author = "Mathias MALZIEU",
year = "2009",
period = Some(Siecle19),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour),
programs = Seq(DireAmour),
level = Facile
@@ -1017,7 +1017,7 @@ object Books {
author = "Maintenant qu’il fait tout le temps nuit sur toi",
year = "2006",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Deuil, Famille),
programs = Seq(),
level = Facile
@@ -1028,7 +1028,7 @@ object Books {
author = "Mathias MALZIEU",
year = "2014",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour, Enquete),
programs = Seq(),
level = Facile
@@ -1040,7 +1040,7 @@ object Books {
year = "2016",
period = None,
genres = Seq(JournalIntime),
- themes = Seq(Maladie, Mort),
+ themes = Seq(Maladie),
programs = Seq(),
level = Moyen
),
@@ -1095,7 +1095,7 @@ object Books {
year = "2014",
parts = 2,
period = Some(Antiquite),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Enquete, Enfants),
programs = Seq(),
level = Moyen
@@ -1118,7 +1118,7 @@ object Books {
author = "Colas GUTMAN",
year = "2007",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Conflit, Enfants, Famille),
programs = Seq(Resister),
level = Facile
@@ -1129,7 +1129,7 @@ object Books {
author = "SEMPE et GOSCINNY",
year = "2008",
period = None,
- genres = Seq(),
+ genres = Seq(Comique),
themes = Seq(Enfants, Amitie, Humour),
programs = Seq(Resister),
level = Facile
@@ -1152,7 +1152,7 @@ object Books {
author = "Hervé WALBECQ",
year = "2015",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Poetique),
programs = Seq(CreationPoetique),
level = Facile
@@ -1163,7 +1163,7 @@ object Books {
author = "Marie-Josée CHRISTIEN",
year = "2015",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Nature, Poetique),
programs = Seq(CreationPoetique),
level = Facile
@@ -1174,7 +1174,7 @@ object Books {
author = "Jean-Claude MOURLEVAT",
year = "2003",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Aventure, Folie),
programs = Seq(RecitAventure),
level = Facile
@@ -1185,7 +1185,7 @@ object Books {
author = "Claire JULLIARD",
year = "1997",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Aventure, Amitie, Famille, Conflit),
programs = Seq(RecitAventure),
level = Moyen
@@ -1195,8 +1195,8 @@ object Books {
title = "Le Renard de Morlange",
author = "Alain SURGET",
year = "1995",
- period = Some(MA),
- genres = Seq(),
+ period = Some(MoyenAge),
+ genres = Seq(Roman),
themes = Seq(Animal, Metamorphose),
programs = Seq(Monstre),
level = Facile
@@ -1207,7 +1207,7 @@ object Books {
author = "Yves GREVET",
year = "2006",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Famille, Exclusion, Poetique),
programs = Seq(Monstre),
level = Facile
@@ -1218,7 +1218,7 @@ object Books {
author = "Xavier-Laurent PETIT",
year = "2015",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Nature, Animal, Amitie, Amour, Famille),
programs = Seq(HommeEtNature),
level = Moyen
@@ -1240,7 +1240,7 @@ object Books {
author = "Thimothée DE FOMBELLE, Julie RICOSSE",
year = "2009",
period = Some(Futur),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Ecole, Nature, Amour),
programs = Seq(UniversNouveaux),
level = Facile
@@ -1250,7 +1250,7 @@ object Books {
title = "Bjorn le Morphir",
author = "Thomas LAVACHERY",
year = "2004",
- period = Some(MA),
+ period = Some(MoyenAge),
genres = Seq(BD, Fantasy, RomanAventure),
themes = Seq(Combat, Initiation),
programs = Seq(Heros),
@@ -1261,7 +1261,7 @@ object Books {
title = "Cinq histoires d’amour et de chevalerie",
author = "Isabelle PERIER et NADEL",
year = "2012",
- period = Some(MA),
+ period = Some(MoyenAge),
genres = Seq(),
themes = Seq(Amour, Chevalerie),
programs = Seq(Heros),
@@ -1274,7 +1274,7 @@ object Books {
year = "2016",
period = Some(Contemporain),
genres = Seq(Epistolaire),
- themes = Seq(Discrimination, Laideur, Adolescence, Famille, Ecole),
+ themes = Seq(Harcelement, Laideur, Adolescence, Famille, Ecole),
programs = Seq(Autrui),
level = Facile
),
@@ -1284,7 +1284,7 @@ object Books {
author = "Anne PERCIN",
year = "2015",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Internet, Famille, Maladie),
programs = Seq(Autrui),
level = Facile
@@ -1295,7 +1295,7 @@ object Books {
author = "Marie-Aude MURAIL",
year = "2004",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Handicap, Humour, Famille),
programs = Seq(Autrui),
level = Moyen
@@ -1306,7 +1306,7 @@ object Books {
author = "Brigitte MINNE",
year = "2007",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Deuil, Handicap),
programs = Seq(Autrui),
level = Facile
@@ -1317,8 +1317,8 @@ object Books {
author = "Christophe LEON",
year = "2011",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Adolescence, Famille, Crime, Justice),
+ genres = Seq(Roman),
+ themes = Seq(Amitie, Famille, Crime),
programs = Seq(Autrui),
level = Facile
),
@@ -1340,8 +1340,8 @@ object Books {
author = "Hervé GIRAUD",
year = "2016",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Deuil, Maladie, Animal, Famille, Mort),
+ genres = Seq(Roman),
+ themes = Seq(Deuil, Maladie, Animal, Famille),
programs = Seq(Autrui),
level = Facile
),
@@ -1351,8 +1351,8 @@ object Books {
author = "Antoine DOLE",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Difference, Exclusion, Famille, Violence, Ecole),
+ genres = Seq(Roman),
+ themes = Seq(Homosexualite, Exclusion, Famille, Ecole),
programs = Seq(Autrui),
level = Facile
),
@@ -1362,8 +1362,8 @@ object Books {
author = "Orianne CHARPENTIER",
year = "2014",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Adolescence, Deuil, Famille, Mort),
+ genres = Seq(Roman),
+ themes = Seq(Adolescence, Deuil, Famille),
programs = Seq(Autrui),
level = Facile
),
@@ -1384,8 +1384,8 @@ object Books {
author = "Xavier-Laurent PETIT",
year = "2005",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Pauvrete, Famille, Violence, Dictature, Enfants, Musique),
+ genres = Seq(Roman),
+ themes = Seq(Pauvrete, Famille, Dictature, Enfants, Musique),
programs = Seq(Reel),
level = Moyen
),
@@ -1407,7 +1407,7 @@ object Books {
year = "2014",
period = Some(Siecle19),
genres = Seq(Fantastique),
- themes = Seq(Angoisse, Famille, Mensonge),
+ themes = Seq(Secret, Folie, Famille, Mensonge),
programs = Seq(Reel),
level = Moyen
),
@@ -1428,8 +1428,8 @@ object Books {
author = "Korneï TCHOUKOVSKI",
year = "2015",
period = Some(Siecle19),
- genres = Seq(),
- themes = Seq(Exclusion, Discrimination, Ecole),
+ genres = Seq(Roman),
+ themes = Seq(Exclusion, Ecole),
programs = Seq(Valeurs),
level = Moyen
),
@@ -1450,7 +1450,7 @@ object Books {
author = "Marie-Aude MURAIL",
year = "2004",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Ecole, Famille, Conflit),
programs = Seq(Valeurs),
level = Moyen
@@ -1461,7 +1461,7 @@ object Books {
author = "Marie-Aude MURAIL",
year = "2016",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Deuil, Famille, Metissage),
programs = Seq(Valeurs),
level = Moyen
@@ -1473,7 +1473,7 @@ object Books {
year = "2014",
period = Some(Siecle19),
genres = Seq(BD),
- themes = Seq(Animal, Discrimination, Violence, Racisme),
+ themes = Seq(Animal, Racisme),
programs = Seq(Valeurs),
level = Facile
),
@@ -1483,7 +1483,7 @@ object Books {
author = "Annelise HEURTIER",
year = "2015",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Deuil, Migration, Famille, Adolescence),
programs = Seq(Valeurs),
level = Moyen
@@ -1494,8 +1494,8 @@ object Books {
author = "Mélody GORNET",
year = "2015",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Adolescence, Famille, Mort, Deuil, Violence, Ecole),
+ genres = Seq(Roman),
+ themes = Seq(Adolescence, Famille, Deuil, Ecole),
programs = Seq(Valeurs),
level = Facile
),
@@ -1505,7 +1505,7 @@ object Books {
author = "Valentine GOBY",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amour, Famille, Migration, Amitie, Litterature),
programs = Seq(Valeurs),
level = Facile
@@ -1538,7 +1538,7 @@ object Books {
author = "Frank ANDRIAT",
year = "2003",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Suicide, Homosexualite, Ecole, Discrimination),
programs = Seq(Valeurs),
level = Facile
@@ -1572,7 +1572,7 @@ object Books {
year = "2013",
period = Some(Contemporain),
genres = Seq(Fantastique),
- themes = Seq(Adolescence, Violence, Danse),
+ themes = Seq(Adolescence, Viol, Danse),
programs = Seq(SeRaconter),
level = Facile
),
@@ -1584,7 +1584,7 @@ object Books {
parts = 8,
period = Some(Contemporain),
genres = Seq(Manga, SF),
- themes = Seq(Adolescence, Mort, Violence, Conflit),
+ themes = Seq(Adolescence, Immortalite, Conflit, Mutant),
programs = Seq(Reel),
level = Moyen
),
@@ -1644,7 +1644,7 @@ object Books {
parts = 6,
period = None,
genres = Seq(Manga, Fantastique, SF),
- themes = Seq(Sentiment, Difference, Mort, Poetique),
+ themes = Seq(Mutant, Magie, Sentiment, Poetique),
programs = Seq(),
level = Facile
),
@@ -1667,8 +1667,8 @@ object Books {
year = "2016",
parts = 42,
period = None,
- genres = Seq(Fantastique),
- themes = Seq(Mort),
+ genres = Seq(Nouvelle, Fantastique, Thriller),
+ themes = Seq(Vieillesse),
programs = Seq(SeRaconter),
level = Difficile
),
@@ -1752,7 +1752,7 @@ object Books {
parts = 3,
period = None,
genres = Seq(Manga),
- themes = Seq(Mort, Magie, Conflit),
+ themes = Seq(Suicide, Magie, Conflit),
programs = Seq(),
level = Moyen
),
@@ -1764,7 +1764,7 @@ object Books {
parts = 2,
period = None,
genres = Seq(Fantastique),
- themes = Seq(Fantome, Humour, Peur, Famille, Malediction),
+ themes = Seq(Fantome, Humour, Famille, Malediction),
programs = Seq(),
level = Moyen
),
@@ -1776,7 +1776,7 @@ object Books {
parts = 2,
period = None,
genres = Seq(SF),
- themes = Seq(Conflit, Ecole, Americain, Violence, Amitie),
+ themes = Seq(Conflit, Ecole, Americain, Amitie),
programs = Seq(),
level = Moyen
),
@@ -1786,8 +1786,8 @@ object Books {
author = "Lucie PIERRAT-PAJOT, Donatien MARY",
year = "2016",
period = Some(Siecle19),
- genres = Seq(Uchronie),
- themes = Seq(Histoire, Litterature, Complot),
+ genres = Seq(Uchronie, SF, Dystopie),
+ themes = Seq(Revolution, Litterature, Complot),
programs = Seq(Ville),
level = Moyen
),
@@ -1809,8 +1809,8 @@ object Books {
author = "Nastasia RUGANI",
year = "2014",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Famille, Adolescence, Violence, Manipulation),
+ genres = Seq(Roman),
+ themes = Seq(Famille, Adolescence, Maltraitance, Manipulation),
programs = Seq(),
level = Moyen
),
@@ -1820,7 +1820,7 @@ object Books {
author = "Jean-Philippe BLONDEL",
year = "2011",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Amitie, Deuil, Ecole, Musique, Adolescence),
programs = Seq(Autrui),
level = Facile
@@ -1842,7 +1842,7 @@ object Books {
author = "Anne-Laure BONDOUX",
year = "2009",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Enfants, Migration),
programs = Seq(),
level = Moyen
@@ -1854,7 +1854,7 @@ object Books {
year = "2006",
period = None,
genres = Seq(SF, Dystopie),
- themes = Seq(Combat, Dictature, Adolescence, Amitie, Peur),
+ themes = Seq(Combat, Dictature, Adolescence, Amitie),
programs = Seq(),
level = Moyen
),
@@ -1864,7 +1864,7 @@ object Books {
author = "Anne-Laure BONDOUX",
year = "2003",
period = None,
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Crime, Amitie, Apprentissage),
programs = Seq(),
level = Moyen
@@ -1875,7 +1875,7 @@ object Books {
author = "Marie-Aude MURAIL",
year = "2000",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Deuil, Maladie, Homosexualite, Famille, Humour),
programs = Seq(Autrui),
level = Moyen
@@ -1887,8 +1887,8 @@ object Books {
year = "2011-2012",
parts = 4,
period = Some(Contemporain),
- genres = Seq(Policier),
- themes = Seq(Enquete, Amitie, Internet, Peur),
+ genres = Seq(Policier, Thriller),
+ themes = Seq(Enquete, Amitie, Internet, Secret),
programs = Seq(),
level = Facile
),
@@ -1910,8 +1910,8 @@ object Books {
author = "Sherman ALEXIE",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Humour, Difference, Discrimination, Ecole, Adolescence, Famille),
+ genres = Seq(Roman),
+ themes = Seq(Humour, Discrimination, Ecole, Adolescence, Famille),
programs = Seq(Valeurs, TraversSociete),
level = Moyen
),
@@ -1921,7 +1921,7 @@ object Books {
author = "Kathrin Schrocke",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Handicap, Amour, Adolescence),
programs = Seq(Autrui),
level = Moyen
@@ -1943,8 +1943,8 @@ object Books {
author = "Sarah COHEN-SCALI",
year = "2013",
period = Some(Contemporain),
- genres = Seq(),
- themes = Seq(Dictature, Guerre, Eugenisme, Nazisme),
+ genres = Seq(Roman),
+ themes = Seq(Dictature, Guerre, Genetique, Nazisme),
programs = Seq(Agir),
level = Difficile
),
@@ -1954,7 +1954,7 @@ object Books {
author = "Malorie BLACKMAN",
year = "2011",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Famille, Homosexualite, Apprentissage),
programs = Seq(),
level = Moyen
@@ -1965,7 +1965,7 @@ object Books {
author = "Mikaël OLLIVIER",
year = "2011",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Famille, Adolescence, Amour, Apprentissage, Secret),
programs = Seq(),
level = Moyen
@@ -1976,7 +1976,7 @@ object Books {
author = "Annelise HEURTIER",
year = "2015",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Voyage, Famille, Adolescence, Initiation, Maladie, Pauvrete),
programs = Seq(VoyageEtAventure),
level = Moyen
@@ -2022,8 +2022,8 @@ object Books {
year = "2015-2016",
parts = 3,
period = None,
- genres = Seq(),
- themes = Seq(Adolescence, Amour, Famille, Mort, Amitie, Violence),
+ genres = Seq(Roman),
+ themes = Seq(Adolescence, Amour, Famille, Amitie, Maltraitance),
programs = Seq(),
level = Difficile
),
@@ -2033,7 +2033,7 @@ object Books {
year = "2006",
period = Some(Contemporain),
genres = Seq(Epistolaire),
- themes = Seq(Adolescence, Suicide, Mort, Deuil),
+ themes = Seq(Adolescence, Deuil),
programs = Seq(SeRaconter),
level = Facile
),
@@ -2045,7 +2045,7 @@ object Books {
parts = 2,
period = Some(Siecle20),
genres = Seq(BD),
- themes = Seq(Nazisme, Guerre, Violence, Mort),
+ themes = Seq(Nazisme, Guerre, Antisemitisme, Prison, Maltraitance),
programs = Seq(SeRaconter),
level = Facile
),
@@ -2055,7 +2055,7 @@ object Books {
author = "Jo WITEK",
year = "2015",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Sexualite, Apprentissage, Sentiment),
programs = Seq(SeRaconter),
level = Facile
@@ -2066,7 +2066,7 @@ object Books {
author = "Elisabeth ATKINSON",
year = "2010",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Amitie, Famille, Discrimination),
programs = Seq(SeRaconter),
level = Moyen
@@ -2088,7 +2088,7 @@ object Books {
author = "Nadia COSTE",
year = "2016",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Dictature, Manipulation, SegregationRaciale, Amour),
programs = Seq(TraversSociete),
level = Moyen
@@ -2110,7 +2110,7 @@ object Books {
author = "Dorothy M. JOHNSON",
year = "2015",
period = Some(Siecle19),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Americain),
programs = Seq(Agir),
level = Moyen
@@ -2121,7 +2121,7 @@ object Books {
author = "Romain SLOCOMBE",
year = "2008",
period = Some(Siecle20),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Guerre, Nazisme),
programs = Seq(Agir),
level = Moyen
@@ -2132,7 +2132,7 @@ object Books {
author = "Gary D. SCHMIDT",
year = "2016",
period = Some(Contemporain),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Adolescence, Ecole, Litterature),
programs = Seq(Agir),
level = Moyen
@@ -2143,7 +2143,7 @@ object Books {
author = "Philippe NESSMANN",
year = "2016",
period = Some(Siecle20),
- genres = Seq(),
+ genres = Seq(Roman),
themes = Seq(Guerre, Femme, Art),
programs = Seq(Agir),
level = Facile
@@ -2154,8 +2154,8 @@ object Books {
author = "JC MOSCOVICI",
year = "1995",
period = Some(Siecle20),
- genres = Seq(),
- themes = Seq(Guerre, Nazisme, Discrimination, Famille),
+ genres = Seq(Autobiographie),
+ themes = Seq(Guerre, Nazisme, Antisemitisme, Racisme, Famille),
programs = Seq(Agir),
level = Facile
),
@@ -2165,8 +2165,8 @@ object Books {
author = "Jean-Jacques GREIF",
year = "1998",
period = Some(Siecle20),
- genres = Seq(),
- themes = Seq(Guerre, Mort, Discrimination, Sport),
+ genres = Seq(Roman),
+ themes = Seq(Guerre, Maltraitance, Discrimination, Sport, Antisemitisme, Prison, Nazisme),
programs = Seq(Agir),
level = Moyen
),
@@ -2176,8 +2176,8 @@ object Books {
author = "John BOYNE",
year = "2006",
period = Some(Siecle20),
- genres = Seq(),
- themes = Seq(Guerre, Amitie, Discrimination, Nazisme),
+ genres = Seq(Roman),
+ themes = Seq(Guerre, Amitie, Antisemitisme, Nazisme),
programs = Seq(Agir),
level = Moyen
),
@@ -2188,7 +2188,7 @@ object Books {
year = "2015",
period = Some(Siecle20),
genres = Seq(BD),
- themes = Seq(Violence, Racisme, Discrimination),
+ themes = Seq(Racisme, Discrimination),
programs = Seq(Agir),
level = Facile
)
diff --git a/src/main/scala/reading/component/index/Menu.scala b/src/main/scala/reading/component/index/Menu.scala
index 9645f5a..a0aabd1 100644
--- a/src/main/scala/reading/component/index/Menu.scala
+++ b/src/main/scala/reading/component/index/Menu.scala
@@ -25,10 +25,19 @@ object Menu {
div(
MenuStyle.groups,
filters().find(_.kind == FilterKind.Grade) match {
+ case Some(grade) => {
+ val programs = Program.values.filter(p => Program.grade(p).toString() == grade.nonFormattedName)
+ group(books, filters, grade.name, programs.map(Filter.apply(_)), Some(grade))
+ }
case None => group(books, filters, "Classe", Grade.values.map(Filter.apply(_)))
- case Some(grade) => group(books, filters, grade.name, Program.values.map(Filter.apply(_)), Some(grade))
},
- group(books, filters, "Theme", Theme.values.sorted.map(Filter.apply(_))),
+ filters().find(_.kind == FilterKind.GroupedTheme) match {
+ case Some(groupedTheme) => {
+ val themes = Theme.values.filter(t => Theme.groupedTheme(t).toString() == groupedTheme.nonFormattedName)
+ group(books, filters, groupedTheme.name, themes.map(Filter.apply(_)), Some(groupedTheme))
+ }
+ case None => group(books, filters, "Theme", GroupedTheme.values.map(Filter.apply(_)))
+ },
group(books, filters, "Genre", Genre.values.sorted.map(Filter.apply(_))),
group(books, filters, "Niveau", Level.values.map(Filter.apply(_))),
group(books, filters, "Période", Period.values.map(Filter.apply(_)))
diff --git a/src/main/scala/reading/models/Filter.scala b/src/main/scala/reading/models/Filter.scala
index c3d81c6..d14ca63 100644
--- a/src/main/scala/reading/models/Filter.scala
+++ b/src/main/scala/reading/models/Filter.scala
@@ -14,6 +14,7 @@ object Filter {
def apply(kind: FilterKind, nonFormattedName: String): Option[Filter] =
kind match {
case FilterKind.Period => Period.withNameOption(nonFormattedName).map(apply[Period])
+ case FilterKind.GroupedTheme => GroupedTheme.withNameOption(nonFormattedName).map(apply[GroupedTheme])
case FilterKind.Theme => Theme.withNameOption(nonFormattedName).map(apply[Theme])
case FilterKind.Genre => Genre.withNameOption(nonFormattedName).map(apply[Genre])
case FilterKind.Level => Level.withNameOption(nonFormattedName).map(apply[Level])
@@ -29,6 +30,8 @@ object Filter {
def remove(fs: Seq[Filter], rf: Filter): Seq[Filter] =
fs.filterNot { f =>
- equals(f, rf) || rf.kind == FilterKind.Grade && f.kind == FilterKind.Program
+ (equals(f, rf)
+ || rf.kind == FilterKind.Grade && f.kind == FilterKind.Program
+ || rf.kind == FilterKind.GroupedTheme && f.kind == FilterKind.Theme)
}
}
diff --git a/src/main/scala/reading/models/FilterFactory.scala b/src/main/scala/reading/models/FilterFactory.scala
index 269af82..c7b9fbf 100644
--- a/src/main/scala/reading/models/FilterFactory.scala
+++ b/src/main/scala/reading/models/FilterFactory.scala
@@ -15,6 +15,16 @@ object FilterFactory {
}
}
+ implicit object GroupedTheme extends FilterFactory[GroupedTheme] {
+ def create(groupedTheme: GroupedTheme): Filter =
+ new Filter {
+ def filter(book: Book): Boolean = book.themes.map(Theme.groupedTheme).contains(groupedTheme)
+ val kind: FilterKind = FilterKind.GroupedTheme
+ val nonFormattedName: String = groupedTheme.toString()
+ val name: String = groupedTheme.prettyPrint()
+ }
+ }
+
implicit object ThemeFilter extends FilterFactory[Theme] {
def create(theme: Theme): Filter =
new Filter {
diff --git a/src/main/scala/reading/models/FilterKind.scala b/src/main/scala/reading/models/FilterKind.scala
index ba63f15..1d01193 100644
--- a/src/main/scala/reading/models/FilterKind.scala
+++ b/src/main/scala/reading/models/FilterKind.scala
@@ -8,6 +8,7 @@ object FilterKind extends Enum[FilterKind] {
val values = findValues
case object Period extends FilterKind
+ case object GroupedTheme extends FilterKind
case object Theme extends FilterKind
case object Genre extends FilterKind
case object Level extends FilterKind
diff --git a/src/main/scala/reading/models/Genre.scala b/src/main/scala/reading/models/Genre.scala
index 8c2a90f..2d55e60 100644
--- a/src/main/scala/reading/models/Genre.scala
+++ b/src/main/scala/reading/models/Genre.scala
@@ -9,7 +9,9 @@ sealed trait Genre extends EnumEntry with Ordered[Genre] {
Compare.format(this.prettyPrint).compare(Compare.format(that.prettyPrint))
def prettyPrint(): String = this match {
+ case Autobiographie => "autobiographie"
case JournalIntime => "journal intime"
+ case Roman => "roman"
case RomanHistorique => "roman historique"
case Policier => "policier"
case Fantastique => "fantastique"
@@ -24,13 +26,16 @@ sealed trait Genre extends EnumEntry with Ordered[Genre] {
case Manga => "manga"
case Thriller => "thriller"
case Epistolaire => "Epistolaire"
+ case Nouvelle => "Nouvelle"
}
}
object Genre extends Enum[Genre] {
val values = findValues
+ case object Autobiographie extends Genre
case object JournalIntime extends Genre
+ case object Roman extends Genre
case object RomanHistorique extends Genre
case object Policier extends Genre
case object Fantastique extends Genre
@@ -45,4 +50,5 @@ object Genre extends Enum[Genre] {
case object Uchronie extends Genre
case object Manga extends Genre
case object Epistolaire extends Genre
+ case object Nouvelle extends Genre
}
diff --git a/src/main/scala/reading/models/GroupedTheme.scala b/src/main/scala/reading/models/GroupedTheme.scala
new file mode 100644
index 0000000..9ece7db
--- /dev/null
+++ b/src/main/scala/reading/models/GroupedTheme.scala
@@ -0,0 +1,43 @@
+package reading.models
+
+import enumeratum._
+
+sealed trait GroupedTheme extends EnumEntry with Ordered[GroupedTheme] {
+ import GroupedTheme._
+
+ def compare(that: GroupedTheme): Int = {
+ values.indexOf(that) - values.indexOf(this)
+ }
+
+ def prettyPrint(): String = this match {
+ case Culture => "culture"
+ case Decouverte => "découverte"
+ case Histoire => "histoire"
+ case Humour => "humour"
+ case Stratageme => "stratagème"
+ case Peur => "peur"
+ case Quotidien => "quotidien"
+ case Technologie => "technologie"
+ case Violence => "violence"
+ case Mort => "mort"
+ case Difference => "difference"
+ case Imaginaire => "imaginaire"
+ }
+}
+
+object GroupedTheme extends Enum[GroupedTheme] {
+ val values = findValues
+
+ case object Culture extends GroupedTheme
+ case object Decouverte extends GroupedTheme
+ case object Histoire extends GroupedTheme
+ case object Humour extends GroupedTheme
+ case object Stratageme extends GroupedTheme
+ case object Peur extends GroupedTheme
+ case object Quotidien extends GroupedTheme
+ case object Technologie extends GroupedTheme
+ case object Violence extends GroupedTheme
+ case object Mort extends GroupedTheme
+ case object Difference extends GroupedTheme
+ case object Imaginaire extends GroupedTheme
+}
diff --git a/src/main/scala/reading/models/Period.scala b/src/main/scala/reading/models/Period.scala
index 00e9427..f148b4c 100644
--- a/src/main/scala/reading/models/Period.scala
+++ b/src/main/scala/reading/models/Period.scala
@@ -10,7 +10,7 @@ sealed trait Period extends EnumEntry with Ordered[Period] {
def prettyPrint(): String = this match {
case Antiquite => "Antiquité"
- case MA => "Moyen âge"
+ case MoyenAge => "Moyen âge"
case Renaissance => "Renaissance"
case Lumieres => "Lumières"
case Louis14 => "Louis XIV"
@@ -27,7 +27,7 @@ object Period extends Enum[Period] {
val values = findValues
case object Antiquite extends Period
- case object MA extends Period
+ case object MoyenAge extends Period
case object Renaissance extends Period
case object Lumieres extends Period
case object Louis14 extends Period
diff --git a/src/main/scala/reading/models/Theme.scala b/src/main/scala/reading/models/Theme.scala
index 632b678..6ab4b9f 100644
--- a/src/main/scala/reading/models/Theme.scala
+++ b/src/main/scala/reading/models/Theme.scala
@@ -10,7 +10,7 @@ sealed trait Theme extends EnumEntry with Ordered[Theme] {
def prettyPrint(): String = this match {
case Amitie => "amitié"
- case Angoisse => "angoisse"
+ case Antisemitisme => "antisémitisme"
case Adolescence => "adolescence"
case Americain => "américain"
case Amour => "amour"
@@ -29,7 +29,6 @@ sealed trait Theme extends EnumEntry with Ordered[Theme] {
case Danse => "danse"
case Deuil => "deuil"
case Dictature => "dictature"
- case Difference => "différence"
case Discrimination => "discrimination"
case Dragon => "dragon"
case Ecole => "école"
@@ -37,47 +36,47 @@ sealed trait Theme extends EnumEntry with Ordered[Theme] {
case Emancipation => "émancipation"
case Enfants => "enfants"
case Espionnage => "espionnage"
- case Eugenisme => "eugénisme"
case Exclusion => "exclusion"
case Famille => "famille"
case Fantome => "fantôme"
case Femme => "femme"
case Folie => "folie"
- case Fratrie => "fratrie"
case Genetique => "génétique"
case Guerre => "guerre"
case Handicap => "handicap"
case Harcelement => "harcelement"
- case Histoire => "histoire"
case Homosexualite => "Homosexualité"
case Humour => "humour"
+ case Immortalite => "immortalité"
case Initiation => "initiation"
case Internet => "internet"
case JeuVideo => "jeu vidéo"
- case Justice => "justice"
case Laideur => "laideur"
case Litterature => "littérature"
case Magie => "magie"
case Maladie => "maladie"
case Malediction => "malédiction"
+ case Maltraitance => "maltraitance"
case Manipulation => "manipulation"
case Marginalite => "marginalite"
case Mensonge => "mensonge"
case Metamorphose => "metamorphose"
case Metissage => "metissage"
case Migration => "migration"
- case Mort => "mort"
+ case Monstrueux => "monstrueux"
case Musique => "musique"
+ case Mutant => "mutant"
case Mythologie => "mythologie"
case Nature => "nature"
case Nazisme => "nazisme"
case Parents => "parents"
case Pauvrete => "pauvrete"
- case Peur => "peur"
case Pirate => "pirate"
case Poetique => "poétique"
+ case Prison => "prison"
case Racisme => "racisme"
case Reecriture => "réécriture"
+ case Revolution => "révolution"
case Robot => "robot"
case Secret => "secret"
case SegregationRaciale => "ségrégation raciale"
@@ -86,8 +85,8 @@ sealed trait Theme extends EnumEntry with Ordered[Theme] {
case Sport => "sport"
case Suicide => "suicide"
case Vampire => "vampire"
- case VieNocturne => "vie nocturne"
- case Violence => "violence"
+ case Vieillesse => "vieillesse"
+ case Viol => "viol"
case Voyage => "voyage"
}
}
@@ -99,7 +98,7 @@ object Theme extends Enum[Theme] {
case object Americain extends Theme
case object Amitie extends Theme
case object Amour extends Theme
- case object Angoisse extends Theme
+ case object Antisemitisme extends Theme
case object Animal extends Theme
case object Apprentissage extends Theme
case object Art extends Theme
@@ -109,15 +108,13 @@ object Theme extends Enum[Theme] {
case object Crime extends Theme
case object Danse extends Theme
case object Deuil extends Theme
- case object Difference extends Theme
- case object Discrimination extends Theme
case object Dictature extends Theme
+ case object Discrimination extends Theme
case object Ecole extends Theme
case object Emancipation extends Theme
case object Enfants extends Theme
case object Enquete extends Theme
case object Espionnage extends Theme
- case object Eugenisme extends Theme
case object Exclusion extends Theme
case object Fantome extends Theme
case object Femme extends Theme
@@ -129,22 +126,21 @@ object Theme extends Enum[Theme] {
case object Cour extends Theme
case object Dragon extends Theme
case object Famille extends Theme
- case object Fratrie extends Theme
case object Genetique extends Theme
case object Guerre extends Theme
case object Handicap extends Theme
case object Harcelement extends Theme
- case object Histoire extends Theme
case object Homosexualite extends Theme
case object Humour extends Theme
+ case object Immortalite extends Theme
case object Initiation extends Theme
case object Internet extends Theme
case object JeuVideo extends Theme
- case object Justice extends Theme
case object Laideur extends Theme
case object Litterature extends Theme
case object Maladie extends Theme
case object Malediction extends Theme
+ case object Maltraitance extends Theme
case object Manipulation extends Theme
case object Magie extends Theme
case object Marginalite extends Theme
@@ -152,18 +148,20 @@ object Theme extends Enum[Theme] {
case object Metamorphose extends Theme
case object Metissage extends Theme
case object Migration extends Theme
- case object Mort extends Theme
+ case object Monstrueux extends Theme
case object Musique extends Theme
+ case object Mutant extends Theme
case object Mythologie extends Theme
case object Nature extends Theme
case object Nazisme extends Theme
case object Parents extends Theme
case object Pauvrete extends Theme
- case object Peur extends Theme
case object Pirate extends Theme
case object Poetique extends Theme
+ case object Prison extends Theme
case object Racisme extends Theme
case object Reecriture extends Theme
+ case object Revolution extends Theme
case object Robot extends Theme
case object Secret extends Theme
case object SegregationRaciale extends Theme
@@ -172,7 +170,26 @@ object Theme extends Enum[Theme] {
case object Sport extends Theme
case object Suicide extends Theme
case object Vampire extends Theme
- case object VieNocturne extends Theme
- case object Violence extends Theme
+ case object Vieillesse extends Theme
+ case object Viol extends Theme
case object Voyage extends Theme
+
+ def groupedTheme(theme: Theme): GroupedTheme = {
+ import GroupedTheme._
+
+ theme match {
+ case Art | Americain | Danse | Litterature | Musique | Mythologie | Poetique | Reecriture | Sport => Culture
+ case Nature | Aventure | Initiation | Pirate | Voyage | Animal => Decouverte
+ case Dragon | Magie => Imaginaire
+ case Mutant | Beaute | Handicap | Homosexualite | Laideur | Metamorphose | Marginalite | Migration | Metissage | Pauvrete | Discrimination => Difference
+ case Maltraitance | Viol | Combat | Conflit | Crime | Harcelement | Exclusion | Racisme | Antisemitisme | SegregationRaciale | Prison => Violence
+ case Chevalerie | Cour | Dictature | Guerre | Nazisme | Revolution => Histoire
+ case Theme.Humour => GroupedTheme.Humour
+ case Enquete | Manipulation | Mensonge | Secret | Espionnage | Complot => Stratageme
+ case Fantome | Folie | Malediction | Vampire | Monstrueux => Peur
+ case Suicide | Deuil | Maladie | Immortalite | Vieillesse => Mort
+ case Adolescence | Amour | Amitie | Apprentissage | College | Ecole | Emancipation | Sentiment | Sexualite | Enfants | Femme | Parents | Famille => Quotidien
+ case Genetique | Internet | JeuVideo | Robot => Technologie
+ }
+ }
}