2
* Copyright (C) 2011 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Alex Launi <alex.launi@canonical.com>
22
namespace Unity.MusicLens {
24
public class Genre : GLib.Object
26
public static const string BLUES_ID = "blues";
27
public static const string CLASSIC_ID = "classic";
28
public static const string COUNTRY_ID = "country";
29
public static const string DISCO_ID = "disco";
30
public static const string FUNK_ID = "funk";
31
public static const string ROCK_ID = "rock";
32
public static const string METAL_ID = "metal";
33
public static const string HIPHOP_ID = "hip-hop";
34
public static const string HOUSE_ID = "house";
35
public static const string NEWWAVE_ID = "new-wave";
36
public static const string RANDB_ID = "r-and-b";
37
public static const string PUNK_ID = "punk";
38
public static const string JAZZ_ID = "jazz";
39
public static const string POP_ID = "pop";
40
public static const string REGGAE_ID = "reggae";
41
public static const string SOUL_ID = "soul";
42
public static const string TECHNO_ID = "techno";
43
public static const string OTHER_ID = "other";
45
private static HashMultiMap<string, string> map;
47
/* void set (K, V), Collection<V> get (K key), Collection<V> get_values (K key) */
50
map = new HashMultiMap<string, string> ();
53
map.set (BLUES_ID, "blues");
56
map.set (CLASSIC_ID, "classic");
59
map.set (COUNTRY_ID, "country");
62
map.set (DISCO_ID, "disco");
65
map.set (FUNK_ID, "funk");
68
map.set (ROCK_ID, "rock");
71
map.set (METAL_ID, "metal");
74
map.set (HIPHOP_ID, "hip-hop");
77
map.set (HOUSE_ID, "house");
80
map.set (NEWWAVE_ID, "new-wave");
83
map.set (RANDB_ID, "r-and-b");
86
map.set (PUNK_ID, "punk");
89
map.set (JAZZ_ID, "jazz");
92
map.set (POP_ID, "pop");
95
map.set (REGGAE_ID, "reggae");
98
map.set (SOUL_ID, "soul");
101
map.set (TECHNO_ID, "techno");
104
map.set (OTHER_ID, "other");
107
public static Collection<string> get_genre_synonyms (string genre_id)
109
return map.get (genre_id);
b'\\ No newline at end of file'