org.musicontroller.importer
Class MusicArchiveEntryBean

java.lang.Object
  extended by org.musicontroller.importer.MusicArchiveEntryBean
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MusicArchiveEntryBean>

public class MusicArchiveEntryBean
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<MusicArchiveEntryBean>

This class holds information about a music archive entry (usually a song), including song title, band name, playlist name, length and tags.

During the import process this bean also contains the location of the extracted MP3 file.

Version:
$Id: MusicArchiveEntryBean.java,v 1.1 2010/03/16 18:55:43 varienaja Exp $
Author:
Hans Drexler
See Also:
Serialized Form

Constructor Summary
MusicArchiveEntryBean()
          Default constructor.
 
Method Summary
 int compareTo(MusicArchiveEntryBean o)
          Define a natural ordening on MusicArchiveEntryBeans based on track number.
 boolean equals(java.lang.Object o)
          Two MusicArchiveEntryBean objects are the same if they have the same song index greater than 0.
 java.lang.String getBandName()
          Getter for the bandname.
 java.lang.String getEntryName()
          Getter for the file name of the MP3 file in the inspected directrory.
 boolean getInclude()
          Getter for the included indicator.
 java.util.Set<java.lang.String> getKeywords()
          Getter for the set of keywords.
 java.lang.String getKeywordString()
          Returns a String repesentation of the keywords in the bean as a comma-separated String of keywords.
 java.lang.String getPlaylistName()
          Getter for the playlist name.
 java.util.Date getReleaseDate()
          Getter for the release date of the playlist.
 int getSongIndex()
          Getter for the song index.
 int getSongLength()
          Getter for the song length.
 java.lang.String getSongName()
          Getter for the name of the song.
 int hashCode()
          Returns a hash code based on the song index.
 void setBandName(java.lang.String name)
          Setter for the bandname.
 void setEntryName(java.lang.String entryName)
          Setter for the file name of the MP3 file in the inspected directrory.
 void setInclude(boolean include)
          Setter for the included indicator.
 void setKeywords(java.util.Set<java.lang.String> keywords)
          Setter for the keyword set.
 void setKeywordString(java.lang.String keywords)
          Splits the argument into comma-separated keywords and stores them in the keywords property of the bean.
 void setPlaylistName(java.lang.String name)
          Setter for the playlist-name.
 void setReleaseDate(java.util.Date releaseDate)
           
 void setSongIndex(int index)
          Setter for the song index.
 void setSongLength(int seconds)
          Setter for the song length.
 void setSongName(java.lang.String name)
          Setter for the name of the song.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicArchiveEntryBean

public MusicArchiveEntryBean()
Default constructor. Initializes the keyword set (empty). Sets the included indicator to true.

Method Detail

getBandName

public java.lang.String getBandName()
Getter for the bandname.

Returns:
The bandname.

setBandName

public void setBandName(java.lang.String name)
Setter for the bandname.

Parameters:
name - The bandname.

getPlaylistName

public java.lang.String getPlaylistName()
Getter for the playlist name.

Returns:
The playlist name.

setPlaylistName

public void setPlaylistName(java.lang.String name)
Setter for the playlist-name.

Parameters:
name - The new playlist name.

getKeywords

public java.util.Set<java.lang.String> getKeywords()
Getter for the set of keywords.

Returns:
The keyword set.

setKeywords

public void setKeywords(java.util.Set<java.lang.String> keywords)
Setter for the keyword set.

Parameters:
keywords - The keyword set.

getSongLength

public int getSongLength()
Getter for the song length.

Returns:
The length of the song in milliseconds.

setSongLength

public void setSongLength(int seconds)
Setter for the song length.

Parameters:
seconds - The song length in milliseconds.

getSongName

public java.lang.String getSongName()
Getter for the name of the song.

Returns:
The song name.

setSongName

public void setSongName(java.lang.String name)
Setter for the name of the song.

Parameters:
name - The song name.

getSongIndex

public int getSongIndex()
Getter for the song index.

Returns:
The song index.

setSongIndex

public void setSongIndex(int index)
Setter for the song index.

Parameters:
index - The index

setInclude

public void setInclude(boolean include)
Setter for the included indicator.

Parameters:
include - The included indicator.

getInclude

public boolean getInclude()
Getter for the included indicator.

Returns:
The included indicator

getEntryName

public java.lang.String getEntryName()
Getter for the file name of the MP3 file in the inspected directrory.

Returns:
The music entry file name.

setEntryName

public void setEntryName(java.lang.String entryName)
Setter for the file name of the MP3 file in the inspected directrory.

Parameters:
entryName - The music entry file name.

getReleaseDate

public java.util.Date getReleaseDate()
Getter for the release date of the playlist.

Returns:
The release date.

setReleaseDate

public void setReleaseDate(java.util.Date releaseDate)

getKeywordString

public java.lang.String getKeywordString()
Returns a String repesentation of the keywords in the bean as a comma-separated String of keywords.

Returns:
String representation of the Keywords

setKeywordString

public void setKeywordString(java.lang.String keywords)
Splits the argument into comma-separated keywords and stores them in the keywords property of the bean. The first letter of each keyword will be capitalized. Empty keywords are ignored.

Parameters:
keywords - The comma-separated list of keywords.

equals

public boolean equals(java.lang.Object o)
Two MusicArchiveEntryBean objects are the same if they have the same song index greater than 0. If the song index on both objects is zero, then they are equal if they have the same band name and song name.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns a hash code based on the song index. If the song index is zero, the hash code is computed from the band name and song name.

Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(MusicArchiveEntryBean o)
Define a natural ordening on MusicArchiveEntryBeans based on track number. If both track numbers are 0 then the Band name decides. If Band names are equal then song name decides.

Specified by:
compareTo in interface java.lang.Comparable<MusicArchiveEntryBean>


Copyright © 2010 A.J.V.. All Rights Reserved.