Get parties a track was released at from the track.
[demoscenemusic.git] / src / main / java / net / pterodactylus / demoscenemusic / data / Track.java
1 /*
2  * DemosceneMusic - Track.java - Copyright © 2012 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.demoscenemusic.data;
19
20 import java.util.Collection;
21 import java.util.List;
22 import java.util.Map;
23
24 /**
25  * Data interface for tracks.
26  *
27  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
28  */
29 public interface Track extends Base {
30
31         /**
32          * Defines relationships between tracks.
33          *
34          * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
35          */
36         public enum Relationship {
37
38                 /** The track is the original of a related track. */
39                 original,
40
41                 /** The track is a remix of a related track. */
42                 remix,
43
44                 /** The track is a cover version of a related track. */
45                 cover,
46
47         }
48
49         /**
50          * Returns the name of this track.
51          *
52          * @return The name of this track
53          */
54         public String getName();
55
56         /**
57          * Sets the name of this track.
58          *
59          * @param name
60          *            The name of this track
61          * @return This track
62          */
63         public Track setName(String name);
64
65         /**
66          * Returns all artists involved in this track.
67          *
68          * @return All involved artists in preferred order
69          */
70         public List<Artist> getArtists();
71
72         /**
73          * Sets all artists involved in this track.
74          *
75          * @param artists
76          *            All involved artists in preferred order
77          * @return This track
78          */
79         public Track setArtists(List<Artist> artists);
80
81         /**
82          * Returns all styles of this track.
83          *
84          * @return All styles of this track
85          */
86         public Collection<Style> getStyles();
87
88         /**
89          * Sets all styles of this track.
90          *
91          * @param styles
92          *            All styles of this track
93          * @return This track
94          */
95         public Track setStyles(Collection<? extends Style> styles);
96
97         /**
98          * Returns the name of this remix. If this track is not a remix,
99          * {@code null} is returned.
100          *
101          * @return The name of this remix, or {@code null} if this track is not a
102          *         remix
103          */
104         public String getRemix();
105
106         /**
107          * Sets the name of the remix.
108          *
109          * @param remix
110          *            The name of this remix, or {@code null} if this track is not a
111          *            remix
112          * @return This track
113          */
114         public Track setRemix(String remix);
115
116         /**
117          * Returns all remix artists involved in this track.
118          *
119          * @return All remix artists involved in this track
120          */
121         public List<Artist> getRemixArtists();
122
123         /**
124          * Sets all remix artists involved in this track.
125          *
126          * @param remixArtists
127          *            All remix artists involved in this track
128          * @return This track
129          */
130         public Track setRemixArtists(List<Artist> remixArtists);
131
132         /**
133          * Returns all derivatives of this track. A derivative of a MOD file could
134          * be a WAV or MP3 file.
135          *
136          * @return All derivatives of this track
137          */
138         public Collection<TrackDerivative> getDerivatives();
139
140         /**
141          * Sets the derivatives of this track.
142          *
143          * @param derivatives
144          *            The derivatives of this track
145          * @return This track
146          */
147         public Track setDerivatives(Collection<TrackDerivative> derivatives);
148
149         /**
150          * Returns all tracks that are somehow related to this track.
151          *
152          * @return All tracks that are related to this track
153          */
154         public Map<Relationship, Collection<Track>> getRelatedTracks();
155
156         /**
157          * Sets all related tracks.
158          *
159          * @param relatedTracks
160          *            All related tracks
161          * @return This track
162          */
163         public Track setRelatedTracks(Map<Relationship, Collection<Track>> relatedTracks);
164
165         /**
166          * Returns all parties this track was released at.
167          *
168          * @return All parties this track was released at
169          */
170         public Collection<Party> getParties();
171
172         /**
173          * Sets all parties this track was released at.
174          *
175          * @param parties
176          *            All parties this track was released at
177          * @return This track
178          */
179         public Track setParties(Collection<Party> parties);
180
181 }