summaryrefslogtreecommitdiff
path: root/isoparser/src/main/java/com/coremedia/iso/boxes/apple/.svn/text-base/AppleStoreCountryCodeBox.java.svn-base
blob: 2c4756af9cf32fb404eac9196b5ea843799e14dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.coremedia.iso.boxes.apple;

import java.util.HashMap;
import java.util.Map;

/**
 * itunes MetaData comment box.
 */
public class AppleStoreCountryCodeBox extends AbstractAppleMetaDataBox {
    private static Map<String, String> countryCodes = new HashMap<String, String>();

    static {
        countryCodes.put("143460", "Australia");
        countryCodes.put("143445", "Austria");
        countryCodes.put("143446", "Belgium");
        countryCodes.put("143455", "Canada");
        countryCodes.put("143458", "Denmark");
        countryCodes.put("143447", "Finland");
        countryCodes.put("143442", "France");
        countryCodes.put("143443", "Germany");
        countryCodes.put("143448", "Greece");
        countryCodes.put("143449", "Ireland");
        countryCodes.put("143450", "Italy");
        countryCodes.put("143462", "Japan");
        countryCodes.put("143451", "Luxembourg");
        countryCodes.put("143452", "Netherlands");
        countryCodes.put("143461", "New Zealand");
        countryCodes.put("143457", "Norway");
        countryCodes.put("143453", "Portugal");
        countryCodes.put("143454", "Spain");
        countryCodes.put("143456", "Sweden");
        countryCodes.put("143459", "Switzerland");
        countryCodes.put("143444", "United Kingdom");
        countryCodes.put("143441", "United States");
    }

    public static final String TYPE = "sfID";


    public AppleStoreCountryCodeBox() {
        super(TYPE);
        appleDataBox = AppleDataBox.getUint32AppleDataBox();
    }


    public String getReadableValue() {
        if (countryCodes.containsKey(getValue())) {
            return countryCodes.get(getValue());
        } else {
            return "unknown country code " + getValue();
        }

    }
}