Package org.localify.music.song
Class Song
java.lang.Object
org.localify.music.song.Song
Represents a song.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Apple Music ID of the song.Gets the Apple Music image URL for the song.Gets the Apple Music preview URL for the song.Gets the creation timestamp.Gets the duration of the song.getId()Gets the ID of the song.getIsrc()Gets the ISRC of the song.getName()Gets the name of the song.Gets the preview URL for the song, preferring Apple Music over Spotify.se.michaelthelin.spotify.model_objects.miscellaneous.AudioAnalysisGets the Spotify audio analysis for the song.Gets the Spotify audio features for the song.Gets the Spotify ID of the song.Gets the Spotify image URL for the song.Gets the Spotify popularity of the song.Gets the Spotify preview URL for the song.Gets the last update timestamp.voidsetAppleId(String appleId) Sets the Apple Music ID of the song.voidsetAppleImage(String appleImage) Sets the Apple Music image URL for the song.voidsetApplePreviewUrl(String applePreviewUrl) Sets the Apple Music preview URL for the song.voidsetDuration(Duration duration) Sets the duration of the song.voidSets the ISRC of the song.voidSets the name of the song.voidsetSpotifyAudioAnalysis(se.michaelthelin.spotify.model_objects.miscellaneous.AudioAnalysis spotifyAudioAnalysis) Sets the Spotify audio analysis for the song.voidsetSpotifyAudioFeatures(SpotifyAudioFeatures spotifyAudioFeatures) Sets the Spotify audio features for the song.voidsetSpotifyId(String spotifyId) Sets the Spotify ID of the song.voidsetSpotifyImage(String spotifyImage) Sets the Spotify image URL for the song.voidsetSpotifyPopularity(Integer spotifyPopularity) Sets the Spotify popularity of the song.voidsetSpotifyPreviewUrl(String spotifyPreviewUrl) Sets the Spotify preview URL for the song.
-
Constructor Details
-
Song
protected Song()Protected no-arg constructor for JPA. -
Song
Constructs a new Song.- Parameters:
name- The name of the song.
-
-
Method Details
-
getPreviewUrl
Gets the preview URL for the song, preferring Apple Music over Spotify.- Returns:
- The preview URL.
-
getId
Gets the ID of the song.- Returns:
- The song ID.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
getName
Gets the name of the song.- Returns:
- The song name.
-
getSpotifyId
Gets the Spotify ID of the song.- Returns:
- The Spotify ID.
-
setName
Sets the name of the song.- Parameters:
name- The song name.
-
getSpotifyPopularity
Gets the Spotify popularity of the song.- Returns:
- The Spotify popularity.
-
getSpotifyImage
Gets the Spotify image URL for the song.- Returns:
- The Spotify image URL.
-
setSpotifyId
Sets the Spotify ID of the song.- Parameters:
spotifyId- The Spotify ID.
-
setSpotifyPopularity
Sets the Spotify popularity of the song.- Parameters:
spotifyPopularity- The Spotify popularity.
-
setSpotifyImage
Sets the Spotify image URL for the song.- Parameters:
spotifyImage- The Spotify image URL.
-
getIsrc
Gets the ISRC of the song.- Returns:
- The ISRC.
-
setIsrc
Sets the ISRC of the song.- Parameters:
isrc- The ISRC.
-
getDuration
Gets the duration of the song.- Returns:
- The duration.
-
setDuration
Sets the duration of the song.- Parameters:
duration- The duration.
-
getSpotifyPreviewUrl
Gets the Spotify preview URL for the song.- Returns:
- The Spotify preview URL.
-
setSpotifyPreviewUrl
Sets the Spotify preview URL for the song.- Parameters:
spotifyPreviewUrl- The Spotify preview URL.
-
getAppleId
Gets the Apple Music ID of the song.- Returns:
- The Apple Music ID.
-
setAppleId
Sets the Apple Music ID of the song.- Parameters:
appleId- The Apple Music ID.
-
getAppleImage
Gets the Apple Music image URL for the song.- Returns:
- The Apple Music image URL.
-
setAppleImage
Sets the Apple Music image URL for the song.- Parameters:
appleImage- The Apple Music image URL.
-
getSpotifyAudioAnalysis
public se.michaelthelin.spotify.model_objects.miscellaneous.AudioAnalysis getSpotifyAudioAnalysis()Gets the Spotify audio analysis for the song.- Returns:
- The Spotify audio analysis.
-
setSpotifyAudioAnalysis
public void setSpotifyAudioAnalysis(se.michaelthelin.spotify.model_objects.miscellaneous.AudioAnalysis spotifyAudioAnalysis) Sets the Spotify audio analysis for the song.- Parameters:
spotifyAudioAnalysis- The Spotify audio analysis.
-
getApplePreviewUrl
Gets the Apple Music preview URL for the song.- Returns:
- The Apple Music preview URL.
-
setApplePreviewUrl
Sets the Apple Music preview URL for the song.- Parameters:
applePreviewUrl- The Apple Music preview URL.
-
getSpotifyAudioFeatures
Gets the Spotify audio features for the song.- Returns:
- The Spotify audio features.
-
setSpotifyAudioFeatures
Sets the Spotify audio features for the song.- Parameters:
spotifyAudioFeatures- The Spotify audio features.
-