1/*
2 * Copyright (C) 2014 Google Inc. All Rights Reserved.
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
17package com.example.android.musicservicedemo.browser;
18
19/**
20 * A class to model music track metadata.
21 */
22public class MusicTrack {
23
24    private static final String TAG = "MusicTrack";
25
26    private String mTitle;
27    private String mAlbum;
28    private String mArtist;
29    private String mGenre;
30    private String mSource;
31    private String mImage;
32    private int mTrackNumber;
33    private int mTotalTrackCount;
34    private int mDuration;
35
36    /**
37     * Constructor creating a MusicTrack instance.
38     *
39     * @param title
40     * @param album
41     * @param artist
42     * @param genre
43     * @param source
44     * @param image
45     * @param trackNumber
46     * @param totalTrackCount
47     * @param duration
48     */
49    public MusicTrack(String title, String album, String artist, String genre, String source,
50            String image, int trackNumber, int totalTrackCount, int duration) {
51        this.mTitle = title;
52        this.mAlbum = album;
53        this.mArtist = artist;
54        this.mGenre = genre;
55        this.mSource = source;
56        this.mImage = image;
57        this.mTrackNumber = trackNumber;
58        this.mTotalTrackCount = totalTrackCount;
59        this.mDuration = duration;
60    }
61
62    public String getTitle() {
63        return mTitle;
64    }
65
66    public void setTitle(String mTitle) {
67        this.mTitle = mTitle;
68    }
69
70    public String getAlbum() {
71        return mAlbum;
72    }
73
74    public void setAlbum(String mAlbum) {
75        this.mAlbum = mAlbum;
76    }
77
78    public String getArtist() {
79        return mArtist;
80    }
81
82    public void setArtist(String mArtist) {
83        this.mArtist = mArtist;
84    }
85
86    public String getGenre() {
87        return mGenre;
88    }
89
90    public void setGenre(String mGenre) {
91        this.mGenre = mGenre;
92    }
93
94    public String getSource() {
95        return mSource;
96    }
97
98    public void setSource(String mSource) {
99        this.mSource = mSource;
100    }
101
102    public String getImage() {
103        return mImage;
104    }
105
106    public void setImage(String mImage) {
107        this.mImage = mImage;
108    }
109
110    public int getTrackNumber() {
111        return mTrackNumber;
112    }
113
114    public void setTrackNumber(int mTrackNumber) {
115        this.mTrackNumber = mTrackNumber;
116    }
117
118    public int getTotalTrackCount() {
119        return mTotalTrackCount;
120    }
121
122    public void setTotalTrackCount(int mTotalTrackCount) {
123        this.mTotalTrackCount = mTotalTrackCount;
124    }
125
126    public int getDuration() {
127        return mDuration;
128    }
129
130    public void setDuration(int mDuration) {
131        this.mDuration = mDuration;
132    }
133
134    public String toString() {
135        return mTitle;
136    }
137
138}
139