Home | History | Annotate | Download | only in apple
      1 package com.coremedia.iso.boxes.apple;
      2 
      3 import java.util.HashMap;
      4 import java.util.Map;
      5 
      6 /**
      7  * itunes MetaData comment box.
      8  */
      9 public class AppleStoreCountryCodeBox extends AbstractAppleMetaDataBox {
     10     private static Map<String, String> countryCodes = new HashMap<String, String>();
     11 
     12     static {
     13         countryCodes.put("143460", "Australia");
     14         countryCodes.put("143445", "Austria");
     15         countryCodes.put("143446", "Belgium");
     16         countryCodes.put("143455", "Canada");
     17         countryCodes.put("143458", "Denmark");
     18         countryCodes.put("143447", "Finland");
     19         countryCodes.put("143442", "France");
     20         countryCodes.put("143443", "Germany");
     21         countryCodes.put("143448", "Greece");
     22         countryCodes.put("143449", "Ireland");
     23         countryCodes.put("143450", "Italy");
     24         countryCodes.put("143462", "Japan");
     25         countryCodes.put("143451", "Luxembourg");
     26         countryCodes.put("143452", "Netherlands");
     27         countryCodes.put("143461", "New Zealand");
     28         countryCodes.put("143457", "Norway");
     29         countryCodes.put("143453", "Portugal");
     30         countryCodes.put("143454", "Spain");
     31         countryCodes.put("143456", "Sweden");
     32         countryCodes.put("143459", "Switzerland");
     33         countryCodes.put("143444", "United Kingdom");
     34         countryCodes.put("143441", "United States");
     35     }
     36 
     37     public static final String TYPE = "sfID";
     38 
     39 
     40     public AppleStoreCountryCodeBox() {
     41         super(TYPE);
     42         appleDataBox = AppleDataBox.getUint32AppleDataBox();
     43     }
     44 
     45 
     46     public String getReadableValue() {
     47         if (countryCodes.containsKey(getValue())) {
     48             return countryCodes.get(getValue());
     49         } else {
     50             return "unknown country code " + getValue();
     51         }
     52 
     53     }
     54 }