| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Mp4ContentTypeValue |
|
| 0.0;0 |
| 1 | package org.jaudiotagger.tag.mp4.atom; | |
| 2 | ||
| 3 | ||
| 4 | /** | |
| 5 | * List of valid values for the Content Type (Stik) atom | |
| 6 | * <p/> | |
| 7 | * <p>These are held as a byte field, normally only used for purcahed items, audio files use a stik of one | |
| 8 | */ | |
| 9 | 2 | public enum Mp4ContentTypeValue |
| 10 | { | |
| 11 | 2 | MOVIE("Movie", 0), |
| 12 | 2 | NORMAL("Normal", 1), |
| 13 | 2 | AUDIO_BOOK("AudioBook", 2), |
| 14 | 2 | BOOKMARK("Whacked Bookmark", 5), |
| 15 | 2 | MUSIC_VIDEO("Music Video", 6), |
| 16 | 2 | SHORT_FILM("Short Film", 9), |
| 17 | 2 | TV_SHOW("TV Show", 10), |
| 18 | 2 | BOOKLET("Booklet", 11); |
| 19 | ||
| 20 | private String description; | |
| 21 | private int id; | |
| 22 | ||
| 23 | ||
| 24 | /** | |
| 25 | * @param description of value | |
| 26 | * @param id used internally | |
| 27 | */ | |
| 28 | Mp4ContentTypeValue(String description, int id) | |
| 29 | 16 | { |
| 30 | 16 | this.description = description; |
| 31 | 16 | this.id = id; |
| 32 | 16 | } |
| 33 | ||
| 34 | /** | |
| 35 | * Return id used in the file | |
| 36 | * | |
| 37 | * @return id | |
| 38 | */ | |
| 39 | public int getId() | |
| 40 | { | |
| 41 | 14 | return id; |
| 42 | } | |
| 43 | ||
| 44 | /** | |
| 45 | * @return the id as a string (convenience method for use with mp4.createtagField() | |
| 46 | */ | |
| 47 | public String getIdAsString() | |
| 48 | { | |
| 49 | 2 | return String.valueOf(id); |
| 50 | } | |
| 51 | ||
| 52 | /** | |
| 53 | * This is the value of the fieldname that is actually used to write mp4 | |
| 54 | * | |
| 55 | * @return | |
| 56 | */ | |
| 57 | public String getDescription() | |
| 58 | { | |
| 59 | 0 | return description; |
| 60 | } | |
| 61 | ||
| 62 | ||
| 63 | } |