Get parties a track was released at from the track.
[demoscenemusic.git] / src / main / java / net / pterodactylus / demoscenemusic / data / Track.java
index 44d271e..cb9249f 100644 (file)
 
 package net.pterodactylus.demoscenemusic.data;
 
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
 /**
- * TODO
+ * Data interface for tracks.
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 public interface Track extends Base {
 
-       public String name();
+       /**
+        * Defines relationships between tracks.
+        *
+        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+        */
+       public enum Relationship {
+
+               /** The track is the original of a related track. */
+               original,
+
+               /** The track is a remix of a related track. */
+               remix,
+
+               /** The track is a cover version of a related track. */
+               cover,
+
+       }
+
+       /**
+        * Returns the name of this track.
+        *
+        * @return The name of this track
+        */
+       public String getName();
+
+       /**
+        * Sets the name of this track.
+        *
+        * @param name
+        *            The name of this track
+        * @return This track
+        */
+       public Track setName(String name);
+
+       /**
+        * Returns all artists involved in this track.
+        *
+        * @return All involved artists in preferred order
+        */
+       public List<Artist> getArtists();
+
+       /**
+        * Sets all artists involved in this track.
+        *
+        * @param artists
+        *            All involved artists in preferred order
+        * @return This track
+        */
+       public Track setArtists(List<Artist> artists);
+
+       /**
+        * Returns all styles of this track.
+        *
+        * @return All styles of this track
+        */
+       public Collection<Style> getStyles();
+
+       /**
+        * Sets all styles of this track.
+        *
+        * @param styles
+        *            All styles of this track
+        * @return This track
+        */
+       public Track setStyles(Collection<? extends Style> styles);
+
+       /**
+        * Returns the name of this remix. If this track is not a remix,
+        * {@code null} is returned.
+        *
+        * @return The name of this remix, or {@code null} if this track is not a
+        *         remix
+        */
+       public String getRemix();
+
+       /**
+        * Sets the name of the remix.
+        *
+        * @param remix
+        *            The name of this remix, or {@code null} if this track is not a
+        *            remix
+        * @return This track
+        */
+       public Track setRemix(String remix);
+
+       /**
+        * Returns all remix artists involved in this track.
+        *
+        * @return All remix artists involved in this track
+        */
+       public List<Artist> getRemixArtists();
+
+       /**
+        * Sets all remix artists involved in this track.
+        *
+        * @param remixArtists
+        *            All remix artists involved in this track
+        * @return This track
+        */
+       public Track setRemixArtists(List<Artist> remixArtists);
+
+       /**
+        * Returns all derivatives of this track. A derivative of a MOD file could
+        * be a WAV or MP3 file.
+        *
+        * @return All derivatives of this track
+        */
+       public Collection<TrackDerivative> getDerivatives();
 
-       public Track name(String name);
+       /**
+        * Sets the derivatives of this track.
+        *
+        * @param derivatives
+        *            The derivatives of this track
+        * @return This track
+        */
+       public Track setDerivatives(Collection<TrackDerivative> derivatives);
 
-       public Artist artist();
+       /**
+        * Returns all tracks that are somehow related to this track.
+        *
+        * @return All tracks that are related to this track
+        */
+       public Map<Relationship, Collection<Track>> getRelatedTracks();
 
-       public Track artist(Artist artist);
+       /**
+        * Sets all related tracks.
+        *
+        * @param relatedTracks
+        *            All related tracks
+        * @return This track
+        */
+       public Track setRelatedTracks(Map<Relationship, Collection<Track>> relatedTracks);
 
-       public Style style();
+       /**
+        * Returns all parties this track was released at.
+        *
+        * @return All parties this track was released at
+        */
+       public Collection<Party> getParties();
 
-       public Track style(Style style);
+       /**
+        * Sets all parties this track was released at.
+        *
+        * @param parties
+        *            All parties this track was released at
+        * @return This track
+        */
+       public Track setParties(Collection<Party> parties);
 
 }