Debian Codegraph @

src/com/drew/metadata/mp3/Mp3Directory.java

raw symbols SCIP
1 /*
2 * Copyright 2002-2019 Drew Noakes and contributors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21 package com.drew.metadata.mp3;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25
26 import java.util.HashMap;
27
28 /**
29 * @author Payton Garland
30 */
31 public class Mp3Directory extends Directory
32 {
33 public static final int TAG_ID = 1;
34 public static final int TAG_LAYER = 2;
35 public static final int TAG_BITRATE = 3;
36 public static final int TAG_FREQUENCY = 4;
37 public static final int TAG_MODE = 5;
38 public static final int TAG_EMPHASIS = 6;
39 public static final int TAG_COPYRIGHT = 7;
40 public static final int TAG_FRAME_SIZE = 8;
41
42 @NotNull
43 private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
44
45 static
46 {
47 _tagNameMap.put(TAG_ID, "ID");
48 _tagNameMap.put(TAG_LAYER, "Layer");
49 _tagNameMap.put(TAG_BITRATE, "Bitrate");
50 _tagNameMap.put(TAG_FREQUENCY, "Frequency");
51 _tagNameMap.put(TAG_MODE, "Mode");
52 _tagNameMap.put(TAG_EMPHASIS, "Emphasis Method");
53 _tagNameMap.put(TAG_COPYRIGHT, "Copyright");
54 _tagNameMap.put(TAG_FRAME_SIZE, "Frame Size");
55 }
56
57 public Mp3Directory()
58 {
59 this.setDescriptor(new Mp3Descriptor(this));
60 }
61
62 @NotNull
63 @Override
64 public String getName()
65 {
66 return "MP3";
67 }
68
69 @NotNull
70 @Override
71 protected HashMap<Integer, String> getTagNameMap()
72 {
73 return _tagNameMap;
74 }
75 }