001package net.filebot.web;
002
003import java.io.Serializable;
004
005public class AudioTrack implements Serializable {
006
007        protected String database;
008
009        protected String artist;
010        protected String title;
011        protected String album;
012
013        protected String albumArtist;
014        protected String trackTitle;
015        protected String genre;
016        protected SimpleDate albumReleaseDate;
017        protected Integer mediumIndex;
018        protected Integer mediumCount;
019        protected Integer trackIndex;
020        protected Integer trackCount;
021
022        protected String mbid; // MusicBrainz Identifier
023
024        public AudioTrack() {
025                // used by deserializer
026        }
027
028        public AudioTrack(AudioTrack other) {
029                this.artist = other.artist;
030                this.title = other.title;
031                this.album = other.album;
032                this.albumArtist = other.albumArtist;
033                this.trackTitle = other.trackTitle;
034                this.genre = other.genre;
035                this.albumReleaseDate = other.albumReleaseDate;
036                this.mediumIndex = other.mediumIndex;
037                this.mediumCount = other.mediumCount;
038                this.trackIndex = other.trackIndex;
039                this.trackCount = other.trackCount;
040                this.mbid = other.mbid;
041                this.database = other.database;
042        }
043
044        public AudioTrack(String artist, String title, String album, String database) {
045                this.artist = artist;
046                this.title = title;
047                this.album = album;
048                this.database = database;
049        }
050
051        public AudioTrack(String artist, String title, String album, String albumArtist, String trackTitle, String genre, SimpleDate albumReleaseDate, Integer mediumIndex, Integer mediumCount, Integer trackIndex, Integer trackCount, String mbid, String database) {
052                this.artist = artist;
053                this.title = title;
054                this.album = album;
055                this.albumArtist = albumArtist;
056                this.trackTitle = trackTitle;
057                this.genre = genre;
058                this.albumReleaseDate = albumReleaseDate;
059                this.mediumIndex = mediumIndex;
060                this.mediumCount = mediumCount;
061                this.trackIndex = trackIndex;
062                this.trackCount = trackCount;
063                this.mbid = mbid;
064                this.database = database;
065        }
066
067        public String getArtist() {
068                return artist;
069        }
070
071        public String getTitle() {
072                return title;
073        }
074
075        public String getAlbum() {
076                return album;
077        }
078
079        public String getAlbumArtist() {
080                return albumArtist;
081        }
082
083        public String getTrackTitle() {
084                return trackTitle;
085        }
086
087        public String getGenre() {
088                return genre;
089        }
090
091        public SimpleDate getAlbumReleaseDate() {
092                return albumReleaseDate;
093        }
094
095        public Integer getMedium() {
096                return mediumIndex;
097        }
098
099        public Integer getMediumCount() {
100                return mediumCount;
101        }
102
103        public Integer getTrack() {
104                return trackIndex;
105        }
106
107        public Integer getTrackCount() {
108                return trackCount;
109        }
110
111        public String getMBID() {
112                return mbid;
113        }
114
115        public String getDatabase() {
116                return database;
117        }
118
119        @Override
120        public AudioTrack clone() {
121                return new AudioTrack(this);
122        }
123
124        @Override
125        public String toString() {
126                return String.format("%s - %s", getArtist(), getTitle());
127        }
128
129}