public class Album extends Object implements Comparable<Album>
Modifier and Type | Field and Description |
---|---|
private String |
albumArtistName_ |
private File |
albumDirFile_ |
private String |
artistDir_ |
private String |
artistName_ |
private char[] |
artistRefKEY_ |
private String |
downloadLink_ |
private Album |
lastFmAlbum_ |
private MusicbrainzRelease |
mb_ |
private String |
mbid_ |
private MusicbrainzRestRequester |
mbRR_ |
private String |
name_ |
private char[] |
refKEY_
The 2 digit HEX char/byte Reference KEY for this Albub .
|
private Date |
releaseDate_ |
(package private) int |
releaseYear_ |
(package private) Vector<Song> |
songs |
static String |
SYSTEM_FILE_SEPERATOR
A holder for this clients System File Separator.
|
static String |
SYSTEM_LINE_SEPERATOR
A holder for this clients System line termination separator.
|
private boolean |
useMusicBrainz_
Flag to control if this class should use Musibrainz lookups to augment the information about this Artist.
|
Constructor and Description |
---|
Album(String albumFileDirPath,
boolean useMusicbrainz,
int albumRefKey,
char[] artistRefKEY)
Constructor for Album.
|
Modifier and Type | Method and Description |
---|---|
String |
albumTitle()
The actual fully expanded, cleaned of underscores and explicits / usable Album Title.
|
String |
albumTitle(boolean removeSpaces)
The actual cleaned of underscores and explicits / usable Album Title.
|
int |
compareTo(Album a2) |
int |
compareToAlbumTitle(Album o)
Compares the Album Titles.
|
int |
compareToReleaseDate(Album a2)
Implements the Comparator and sorts by Date of album.
|
boolean |
contains(String SongNameNoSpaces) |
String |
getArtistDir()
Get Method for class field 'artistDir_'.
|
char[] |
getArtistRefKEY()
Get Method for class field 'artistRefKEY_' for this Album.
|
String |
getArtistRefKeyString() |
String |
getDownloadLink() |
String |
getMbid()
Get Method for class field 'mbid_'.
|
int |
getNumberOfSongs() |
char[] |
getRefKEY()
Get Method for class field 'refKEY_' for this Album.
|
String |
getRefKeyString()
gets the refKey_ as a HEX String (ie. 0b ) .
|
Date |
getReleaseDate()
Get Method for class field 'releaseDate_'.
|
String |
getReleaseDateStr()
Get releaseDate as a String.
|
int |
getReleaseYear()
Get releaseDate YEAR as an int.
|
Song[] |
getSongArray() |
Song[] |
getSongArraySortedByTrackNum() |
Song[] |
getSongArraySortedByTrackNum2() |
Vector<Song> |
getSongs() |
boolean |
isArtistRefKEYEmpty() |
String |
listSongs()
A single string listing one songname per line ( with spaces in names) .
|
String |
listSongs(boolean removeSpaces) |
void |
markLovedSongs(Vector<String> lovedTrackNames)
loops thropugh all Album Songs and test and marks them as Last.fm loved if they are.
|
String |
name()
AlbumName part of the filename with spaces in name .
|
String |
name(boolean removeSpaces)
AlbumName part of the filename with or without spaces in name .
|
private void |
readSongs()
Reads the song files in the dir and loads the songs vector.
|
char[] |
retrieveArtistRefKey() |
Album |
retrieveLastFmAlbum()
Returns a wrapper for this Album's LastFM Album or null if not valid name.
|
Album |
retrieveLastFmAlbum(boolean reRetrieve) |
static Album |
retrieveLastFmAlbum(String art,
String albumName)
Returns a wrapper for the LastFM Album or null if not valid name.
|
static String |
retrieveLastFmAlbumUrl(String art,
String albumName)
Returns a wrapper for the LastFM Album or null if not valid name.
|
int |
retrieveMusicBrainzReleaseYear() |
int |
retrieveMusicBrainzReleaseYear(String artistName,
String albumTitle) |
void |
setArtistDir(String artistDir)
Set Method for class field 'artistDir_'.
|
void |
setArtistRefKEY(char[] artistRefKEY)
Set Method for class field 'artistRefKEY_' for this Album.
|
void |
setDownloadLink(String linkStr) |
void |
setMbid(String mbid)
Set Method for class field 'mbid_'.
|
void |
setRefKEY(char[] refKEY)
Set Method for class field 'refKEY_' for this Album.
|
void |
setReleaseDate(Date releaseDate)
Set Method for class field 'releaseDate_'.
|
String[] |
songNames()
Sorted song file Names alphabetically with spaces in names .
|
String[] |
songNames(boolean removeSpaces)
Sorted song file Names alphabetically with spaces in names .
|
String[] |
songNames(boolean removeSpaces,
boolean sorted)
song file Names allowing you to contol sorting and spacing.
|
String[] |
songNames(boolean removeSpaces,
boolean sorted,
int sortBy)
song file Names allowing you to contol sorting and spacing.
|
String[] |
songNamesSortByTrackNum(boolean removeSpaces)
Deprecated.
|
String[] |
songNamesSortedByTrackNum(boolean removeSpaces)
Sorts the Passed in songNames by their track number on this album.
|
String[] |
songTitles()
Sorted songTitles with spaces in names .
|
String[] |
songTitles(boolean removeSpaces) |
String[] |
songTitles(boolean removeSpaces,
boolean sorted) |
String |
toJsonString(int songIndex)
lists all songs in a JSON string.
|
String |
toMetaJson()
Cobbles together the meta-data information about this Artist Directory in a JSON string.
|
JsonObject |
toMetaJsonObject()
Cobbles together the meta-data information about this Artist Directory in a JSON Object.
|
String |
toMusicMakerHtmlDivString() |
String |
toString()
The Song Title.
|
String |
toString(boolean html) |
void |
writeHtmlDivFile() |
void |
writeMetaJsonFile() |
private String artistName_
private String albumArtistName_
private String artistDir_
private File albumDirFile_
private String downloadLink_
private Album lastFmAlbum_
private Date releaseDate_
int releaseYear_
private MusicbrainzRestRequester mbRR_
private MusicbrainzRelease mb_
private boolean useMusicBrainz_
private char[] refKEY_
private char[] artistRefKEY_
public static final String SYSTEM_FILE_SEPERATOR
public static final String SYSTEM_LINE_SEPERATOR
private void readSongs()
public void setArtistDir(String artistDir)
artistDir
- is the value to set this class field to.public String getArtistDir()
public void setDownloadLink(String linkStr)
public String getDownloadLink()
public String getRefKeyString()
public void setRefKEY(char[] refKEY)
refKEY
- is the value to set this class field to.public void setArtistRefKEY(char[] artistRefKEY)
artistRefKEY
- is the value to set this class field to.public char[] getRefKEY()
public char[] getArtistRefKEY()
public String getArtistRefKeyString()
public boolean isArtistRefKEYEmpty()
public char[] retrieveArtistRefKey()
public String toMetaJson()
public JsonObject toMetaJsonObject()
public void writeMetaJsonFile()
public void writeHtmlDivFile()
public String toMusicMakerHtmlDivString()
public void setMbid(String mbid)
mbid
- is the value to set this class field to.public String getMbid()
public String[] songNames()
public String[] songNames(boolean removeSpaces)
removeSpaces
- flags to remove Spaces from the songName or return CamelCasepublic String[] songNames(boolean removeSpaces, boolean sorted)
removeSpaces
- flags to remove Spaces from the songName or return CamelCasesorted
- flags to sort or not sort using default sortByNumberspublic String[] songNames(boolean removeSpaces, boolean sorted, int sortBy)
removeSpaces
- flags to remove Spaces from the songName ie. CamelCasesorted
- flags to sort or not sortsortBy
- signals what to sortby - 0=alphabetical Name or by 1=trackNumberpublic String[] songTitles()
public String[] songTitles(boolean removeSpaces)
public String[] songTitles(boolean removeSpaces, boolean sorted)
@Deprecated public String[] songNamesSortByTrackNum(boolean removeSpaces)
public String[] songNamesSortedByTrackNum(boolean removeSpaces)
public Song[] getSongArray()
public Song[] getSongArraySortedByTrackNum()
public Song[] getSongArraySortedByTrackNum2()
public int getNumberOfSongs()
public String listSongs()
public String name(boolean removeSpaces)
public String albumTitle()
public String albumTitle(boolean removeSpaces)
public void markLovedSongs(Vector<String> lovedTrackNames)
public Album retrieveLastFmAlbum()
public Album retrieveLastFmAlbum(boolean reRetrieve)
public static Album retrieveLastFmAlbum(String art, String albumName)
public int retrieveMusicBrainzReleaseYear()
public int retrieveMusicBrainzReleaseYear(String artistName, String albumTitle)
public static String retrieveLastFmAlbumUrl(String art, String albumName)
public void setReleaseDate(Date releaseDate)
releaseDate
- is the value to set this class field to.public Date getReleaseDate()
public String getReleaseDateStr()
public int getReleaseYear()
public int compareTo(Album a2)
compareTo
in interface Comparable<Album>
public int compareToReleaseDate(Album a2)
public int compareToAlbumTitle(Album o)
public String toJsonString(int songIndex)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses