1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package entagged.audioformats.ape;
20
21 import entagged.audioformats.ape.util.ApeTagTextField;
22 import entagged.audioformats.generic.AbstractTag;
23 import entagged.audioformats.generic.TagField;
24
25 public class ApeTag extends AbstractTag {
26
27 protected String getArtistId() {
28 return "Artist";
29 }
30 protected String getAlbumId() {
31 return "Album";
32 }
33 protected String getTitleId() {
34 return "Title";
35 }
36 protected String getTrackId() {
37 return "Track";
38 }
39 protected String getYearId() {
40 return "Year";
41 }
42 protected String getCommentId() {
43 return "Comment";
44 }
45 protected String getGenreId() {
46 return "Genre";
47 }
48
49 protected TagField createArtistField(String content) {
50 return new ApeTagTextField("Artist", content);
51 }
52 protected TagField createAlbumField(String content) {
53 return new ApeTagTextField("Album", content);
54 }
55 protected TagField createTitleField(String content) {
56 return new ApeTagTextField("Title", content);
57 }
58 protected TagField createTrackField(String content) {
59 return new ApeTagTextField("Track", content);
60 }
61 protected TagField createYearField(String content) {
62 return new ApeTagTextField("Year", content);
63 }
64 protected TagField createCommentField(String content) {
65 return new ApeTagTextField("Comment", content);
66 }
67 protected TagField createGenreField(String content) {
68 return new ApeTagTextField("Genre", content);
69 }
70
71 protected boolean isAllowedEncoding(String enc) {
72 return enc.equals("UTF-8");
73 }
74
75 public String toString() {
76 return "APE "+super.toString();
77 }
78 }
79