Source Code Cross Referenced for ID3GenreList.java in  » Net » DrFTPD » org » drftpd » id3 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » DrFTPD » org.drftpd.id3 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of DrFTPD, Distributed FTP Daemon.
003:         *
004:         * DrFTPD is free software; you can redistribute it and/or modify
005:         * it under the terms of the GNU General Public License as published by
006:         * the Free Software Foundation; either version 2 of the License, or
007:         * (at your option) any later version.
008:         *
009:         * DrFTPD is distributed in the hope that it will be useful,
010:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:         * GNU General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU General Public License
015:         * along with DrFTPD; if not, write to the Free Software
016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
017:         */
018:        package org.drftpd.id3;
019:
020:        import org.apache.log4j.Logger;
021:
022:        /**
023:         * @author Jamal
024:         * @version $Id: ID3GenreList.java 1192 2005-06-15 21:38:30Z zubov $
025:         */
026:        public class ID3GenreList {
027:            public static final String[] genres = { "Blues", "Classic Rock",
028:                    "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop",
029:                    "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop",
030:                    "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial",
031:                    "Alternative", "Ska", "Death Metal", "Pranks",
032:                    "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
033:                    "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
034:                    "Instrumental", "Acid", "House", "Game", "Sound Clip",
035:                    "Gospel", "Noise", "Alternative Rock", "Bass", "Soul",
036:                    "Punk", "Space", "Meditative", "Instrumental Pop",
037:                    "Instrumental Rock", "Ethnic", "Gothic", "Darkwave",
038:                    "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance",
039:                    "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
040:                    "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
041:                    "Native US", "Cabaret", "New Wave", "Psychadelic", "Rave",
042:                    "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk",
043:                    "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll",
044:                    "Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing",
045:                    "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic",
046:                    "Bluegrass", "Avantgarde", "Gothic Rock",
047:                    "Progressive Rock", "Psychedelic Rock", "Symphonic Rock",
048:                    "Slow Rock", "Big Band", "Chorus", "Easy Listening",
049:                    "Acoustic", "Humour", "Speech", "Chanson", "Opera",
050:                    "Chamber Music", "Sonata", "Symphony", "Booty Bass",
051:                    "Primus", "Porn Groove", "Satire", "Slow Jam", "Club",
052:                    "Tango", "Samba", "Folklore", "Ballad", "Power Ballad",
053:                    "Rhytmic Soul", "Freestyle", "Duet", "Punk Rock",
054:                    "Drum Solo", "Acapella", "Euro-House", "Dance Hall", "Goa",
055:                    "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie",
056:                    "BritPop", "Negerpunk", "Polsk Punk", "Beat",
057:                    "Christian Gangsta", "Heavy Metal", "Black Metal",
058:                    "Crossover", "Contemporary C", "Christian Rock",
059:                    "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
060:                    "SynthPop" };
061:
062:            private static final Logger logger = Logger
063:                    .getLogger(ID3GenreList.class);
064:
065:            /** Returns the Genre for given number
066:             *        @return Genre as String
067:             */
068:            public static String getGenre(int number) {
069:                int index = number & 0xff;
070:                try {
071:                    return genres[index];
072:                } catch (ArrayIndexOutOfBoundsException e) {
073:                    logger.warn("Unknown genre number: " + index);
074:                    return "";
075:                }
076:            }
077:
078:            /** Checks, if the given genre is a valid one
079:             *  @return boolean
080:             */
081:            public static boolean validateGenre(String genre) {
082:                if (getGenreIndex(genre) != -1) {
083:                    return true;
084:                }
085:
086:                return false;
087:            }
088:
089:            /** Returns the array index of this genre, or -1 if it is an invalid one.
090:             *  @return int array index
091:             */
092:            public static int getGenreIndex(String genre) {
093:                int index = -1;
094:
095:                for (int i = 0; i < genres.length; i++) {
096:                    if (genre.equals(genres[i])) {
097:                        index = i;
098:                    }
099:                }
100:
101:                return index;
102:            }
103:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.