~ubuntu-branches/ubuntu/utopic/libjaudiotagger-java/utopic

« back to all changes in this revision

Viewing changes to src/org/jaudiotagger/tag/id3/valuepair/ReceivedAsTypes.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-04-28 23:52:43 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110428235243-pzalvw6lncis3ukf
Tags: 2.0.3-1
* d/control: Drop Depends on default-jre per Debian Java Policy as its
  a library package.
* d/watch: Fix to directly monitor SVN tags.
* Switch to 3.0 (quilt) format.
* Bump Standards-Version to 3.9.2 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * @author : Paul Taylor
3
 
 * <p/>
4
 
 * Version @version:$Id: ReceivedAsTypes.java,v 1.3 2007/08/06 16:04:36 paultaylor Exp $
5
 
 * <p/>
6
 
 * Jaudiotagger Copyright (C)2004,2005
7
 
 * <p/>
8
 
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
9
 
 * General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
10
 
 * or (at your option) any later version.
11
 
 * <p/>
12
 
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
13
 
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
 * See the GNU Lesser General Public License for more details.
15
 
 * <p/>
16
 
 * You should have received a copy of the GNU Lesser General Public License ainteger with this library; if not,
17
 
 * you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
 
 * <p/>
20
 
 * Description:
21
 
 * Used by Commercial Frame (COMR)
22
 
 */
23
 
package org.jaudiotagger.tag.id3.valuepair;
24
 
 
25
 
import org.jaudiotagger.tag.datatype.AbstractIntStringValuePair;
26
 
 
27
 
public class ReceivedAsTypes extends AbstractIntStringValuePair
28
 
{
29
 
    private static ReceivedAsTypes receivedAsTypes;
30
 
 
31
 
    public static ReceivedAsTypes getInstanceOf()
32
 
    {
33
 
        if (receivedAsTypes == null)
34
 
        {
35
 
            receivedAsTypes = new ReceivedAsTypes();
36
 
        }
37
 
        return receivedAsTypes;
38
 
    }
39
 
 
40
 
    private ReceivedAsTypes()
41
 
    {
42
 
        idToValue.put(0x00, "Other");
43
 
        idToValue.put(0x01, "Standard CD album with other songs");
44
 
        idToValue.put(0x02, "Compressed audio on CD");
45
 
        idToValue.put(0x03, "File over the Internet");
46
 
        idToValue.put(0x04, "Stream over the Internet");
47
 
        idToValue.put(0x05, "As note sheets");
48
 
        idToValue.put(0x06, "As note sheets in a book with other sheets");
49
 
        idToValue.put(0x07, "Music on other media");
50
 
        idToValue.put(0x08, "Non-musical merchandise");
51
 
        createMaps();
52
 
    }
53
 
}
 
1
/**
 
2
 * @author : Paul Taylor
 
3
 * <p/>
 
4
 * Version @version:$Id: ReceivedAsTypes.java 867 2010-01-28 16:27:11Z paultaylor $
 
5
 * <p/>
 
6
 * Jaudiotagger Copyright (C)2004,2005
 
7
 * <p/>
 
8
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
 
9
 * General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
 
10
 * or (at your option) any later version.
 
11
 * <p/>
 
12
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 
13
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
14
 * See the GNU Lesser General Public License for more details.
 
15
 * <p/>
 
16
 * You should have received a copy of the GNU Lesser General Public License ainteger with this library; if not,
 
17
 * you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
19
 * <p/>
 
20
 * Description:
 
21
 * Used by Commercial Frame (COMR)
 
22
 */
 
23
package org.jaudiotagger.tag.id3.valuepair;
 
24
 
 
25
import org.jaudiotagger.tag.datatype.AbstractIntStringValuePair;
 
26
 
 
27
/**
 
28
 * Defines how song was purchased used by the COMR frame
 
29
 * 
 
30
 */
 
31
public class ReceivedAsTypes extends AbstractIntStringValuePair
 
32
{
 
33
    //The number of bytes used to hold the text encoding field size
 
34
    public static final int RECEIVED_AS_FIELD_SIZE = 1;
 
35
 
 
36
    private static ReceivedAsTypes receivedAsTypes;
 
37
 
 
38
    public static ReceivedAsTypes getInstanceOf()
 
39
    {
 
40
        if (receivedAsTypes == null)
 
41
        {
 
42
            receivedAsTypes = new ReceivedAsTypes();
 
43
        }
 
44
        return receivedAsTypes;
 
45
    }
 
46
 
 
47
    private ReceivedAsTypes()
 
48
    {
 
49
        idToValue.put(0x00, "Other");
 
50
        idToValue.put(0x01, "Standard CD album with other songs");
 
51
        idToValue.put(0x02, "Compressed audio on CD");
 
52
        idToValue.put(0x03, "File over the Internet");
 
53
        idToValue.put(0x04, "Stream over the Internet");
 
54
        idToValue.put(0x05, "As note sheets");
 
55
        idToValue.put(0x06, "As note sheets in a book with other sheets");
 
56
        idToValue.put(0x07, "Music on other media");
 
57
        idToValue.put(0x08, "Non-musical merchandise");
 
58
        createMaps();
 
59
    }
 
60
}