org.musicontroller.importer
Class MusicArchiveBean

java.lang.Object
  extended by org.musicontroller.importer.MusicArchiveBean
All Implemented Interfaces:
java.io.Serializable

public class MusicArchiveBean
extends java.lang.Object
implements java.io.Serializable

This class contains information about an uploaded music archive file.

The inner class PlaylistImportProperties is used for setting instruction for the importer per playlist name.

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

Constructor Summary
MusicArchiveBean()
          The default constructor initializes the entries and the playlist properties to an empty set and all other properties to null.
 
Method Summary
 void addEntry(MusicArchiveEntryBean entry)
          Adds an entry to the music archive.
 void analyseMusicArchive()
          Analyses the entries in the music archive to create a list of different playlists.
 java.lang.String getArchiveName()
          Getter for the music archive name.
 java.util.Set<MusicArchiveEntryBean> getEntrySet()
           
 java.util.Set<java.lang.String> getPlaylistNames()
          Returns a set of all distinct playlist names in the archive.
 PlaylistImportProperties getPlaylistProperties(java.lang.String playlistName)
          Get the per playlist properties of the specified playlist.
 java.util.Set<PlaylistImportProperties> getPlaylistPropertySet()
           
 java.util.Date getReleaseDate()
          Returns the minimum value of releaseDate of all entries, or the value of release date that has been set.
 void setArchiveName(java.lang.String name)
          Setter for the music archive name.
 void setPlaylistProperties(java.lang.String playlistName, PlaylistImportProperties properties)
          Setter for the per playlist import properties of the specified playlist.
 void setReleaseDate(java.util.Date releaseDate)
          Sets the release date value of this bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicArchiveBean

public MusicArchiveBean()
The default constructor initializes the entries and the playlist properties to an empty set and all other properties to null.

Method Detail

getPlaylistProperties

public PlaylistImportProperties getPlaylistProperties(java.lang.String playlistName)
Get the per playlist properties of the specified playlist.

Returns:
The per playlist import properties of the specified playlist or null.

getPlaylistPropertySet

public java.util.Set<PlaylistImportProperties> getPlaylistPropertySet()

getPlaylistNames

public java.util.Set<java.lang.String> getPlaylistNames()
Returns a set of all distinct playlist names in the archive.

Returns:
A set of all distinct playlist names in the archive.

setPlaylistProperties

public void setPlaylistProperties(java.lang.String playlistName,
                                  PlaylistImportProperties properties)
Setter for the per playlist import properties of the specified playlist.

Parameters:
properties - The per playlist import properties.

getArchiveName

public java.lang.String getArchiveName()
Getter for the music archive name.

Returns:
The music archive name.

setArchiveName

public void setArchiveName(java.lang.String name)
Setter for the music archive name.

Parameters:
name - The music archive name.

getEntrySet

public java.util.Set<MusicArchiveEntryBean> getEntrySet()

getReleaseDate

public java.util.Date getReleaseDate()
Returns the minimum value of releaseDate of all entries, or the value of release date that has been set.

Returns:

setReleaseDate

public void setReleaseDate(java.util.Date releaseDate)
Sets the release date value of this bean.

Parameters:
releaseDate - The release date.

addEntry

public void addEntry(MusicArchiveEntryBean entry)
Adds an entry to the music archive.

Parameters:
entry - The entry to add. Null values are ignored. If the playlist name is null, "" is used as the playlist name.

analyseMusicArchive

public void analyseMusicArchive()
Analyses the entries in the music archive to create a list of different playlists. If the archive already contains an entry for a playlist in the music archive, that entry is not changed. Maintain information on every playlist found:

Parameters:
archive - The music archive to analyse.


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